Replies: 3 comments 5 replies
-
Thanks @grd for the hint. We are currently using C++ with Qt for "larger" (for good efficiency), and PyQt5 for "smaller" applications (because they don't need to be compiled). Maybe Nim would be a good middle ground. But the downside is that there are few developers knowledgable in it. |
Beta Was this translation helpful? Give feedback.
-
Definitely looks interesting, however FreeBSD support doesn't seem to be there yet?
|
Beta Was this translation helpful? Give feedback.
-
Now that you are learning Nim, I want to say a bit about Nim and in what it differs between Python. Nim is typed and they mean it. With that it is more related to C++ and talking about C++, Nim also has operator overloading and function overloading. Both these things are used frequently when you need to wrap a C++ header, which will happen as much as with Go, Rust or Python. Also extending C++ with Nim is easy after you wrapped the header file, but wrapping a C++ header file is a PITA and that has nothing to do with Nim but with C++. If you want to have examples then I can give you a couple of libraries, but The other thing, to me, is that Nim looks more to be close to the metal than Python. With that I think you can compare it more with C++ than Python, but Nim appears to me, again, much better than both, simply because it also lacks things such as I think that when you use Nim the community picks it up rather soon because Nim has a lot in common with Python. But the benefit is also that you can look at the generated C++ code and that helps when you see what code Nim generates. Pragmas are used rather frequently in Nim. That's it. I hope that you learn a lot and have fun. Btw, I am not an expert in Nim. I learned Nim a couple of months ago, but I like it. The Nim forum is also good and they welcome you with your questions. |
Beta Was this translation helpful? Give feedback.
-
Hi, do you all like to write in C++? I bet you do. You all like it because you have to and that is why there are so many alternative languages to C++. One of them is Nim and Nim is a very special one.
What is Nim? It is hard to explain Nim but you need to look at the code and find it out https://nim-lang.org/
So Nim is "Efficient, expressive, elegant" but it has a lot more. You can write your code like an ordinary Python code, but Nim is compiled and has roughly the same speed as C++. It is mature but tbh I don't know exactly how good with FreeBSD / *nix. Linux of course yes and Windows too but other operating sytems can be a bit harder as you all know. Not Nim itself, that works, but the rest...
But why am I mentioning Nim? It's because now there is a new library https://github.com/jerous86/nimqt which works for me on Linux and I think that Nim is much better than Go because Nim has so much more than Go. Nim has generics (that was always a hot topic in Go), templates and macros. You can use a GC but that is optional. The GC that is gonna be the default in 2.0 is ORC (optimized reference counting). The compile speed is good and the files are much smaller than the ones in Go.
Well, it's just an idea.
Beta Was this translation helpful? Give feedback.
All reactions