Nim has the second one, http://www.red-lang.org/ while immature has the first and's making progress of the second, and Haxe while poorly documented has the last one (and major corporate users, and targets Flash/JS/C#(Unity!)). If not for LLVM or speed, even Go, Julia, or Rust would be fine. So I'm curious, why are nimmies (nimrods?) interested in this programming language? Are there alternatives to these three? And why is its financial future related to a game engine with software culling, a fork, and poor direction?
Considering how many language choices are out there, I have to be tough to narrow them down to one. I tried to be a bit specific and will certainly listen to answers to my perceived and real criticism.
Another thing to note is every project a developer commits time to is less improvement or leverage of another, an opportunity cost. I see Haxe and Red as filling a similar niche as Nim, Ruby similarity aside. Am I missing a niche altogether?
clean room (not messy GCC/LLVM) desktop/laptop compilation
bootstrapped
decent community and/or financial backing
may be OCaml ?
First - on the elegance part, the docs for Nim are IMHO fairly good given the smaller community - if you actually take time to read. The elegance of Nim comes not from its specification, it's indeed a huge language, but rather from how it feels writing Nim code. The complexity of the language tends to somehow not get into your face, hard to explain.
But ... the mix of languages you mention is a bit... odd. IMHO it should be fairly easy to separate them from each other. You want "C++-speed" and you mention "game engine" etc. In this area Nim is a pretty darn good fit, it can generate (and thus interoperate fairly easily) C++ which makes it quite ideal for the gaming industry where C++ still is King.
Red is quite a radically different beast. I mean... very much so, I don't even know where to begin. Go is not as performant AFAIK nor even near as advanced as Nim is (type system, abstraction mechanisms etc) and given your domain choice I suspect those parts are important. Rust seems like the only plausible alternative that you specified, but... well, the Nim vs Rust topic is very googlable.
What does Nim offer over Haxe or Red?
For me is faster and looks better than Haxe or Red. I dont even know why someone would compare nim to Haxe, it is like comparing java to haskell. I mean, is possible if you want to compare only the names, because there is little they have in common.
I didnt know red, but i dislike its syntax, looks like json.
By the way, Nim is elegant. For me, those aspects you outline are not part of the language: You dont have to use aporia IDE, the docs will improve over time (which also applies to the manual). Most pl have resources to improve their docs/IDEs, but who cares if the language, the core itself, doesn't do/perform the way you need it to.
For me, most problems Nim faces are temporal and can (this is important) be improved over time. For example, with rust, i dont like its syntax, and no matter how much time passes, that cannot be improved.
clean room (not messy GCC/LLVM) desktop/laptop compilation
What do you mean by this and why is this something that is important?
Hi,
I can't talk about red (never heard of until now), but I use Haxe for my every day work since 2006. So I can make some comparisons:
differences:
So when to choose Haxe and when nim ? If you need to go cross platform, there is IMHO no way around Haxe, because you have all options - JS, neko, C++, Java, C#, PHP, Python, LUA. If you need to go to bare metal choose nim. You can easy combine both languages - write the performance critical code in nim (if you hate C or C++ like me) BTW. I tried to make a nim target for Haxe, but never got far because OCAML is really hard for a beginner.
Some of these requirements can be relaxed some of the time, and of course, I work on plenty of codebases where the choice of programming language is already set in stone.
But in general, these requirements narrowed my options down to very few programming languages: Basically, Nim, OCaml, Haxe, D, and Vala.
A major problem with many languages is the ability to build from source (or lack thereof), which kills a lot of compiled languages for me (interpreters usually aren't an issue). Nim and OCaml handle this fine (Nim can be built from C, OCaml via building the bytecode backend first). Haxe can sort of do the same by first building OCaml (the Haxe compiler is written in OCaml), but doesn't really offer me anything over OCaml that I'm interested in (I have no need for multiple backends). D has moved away from a compiler written in C++ to a self-hosting compiler, so this is likely to become less of an option in the near future (plus, D seems to be trying to make GC optional, which I'm not interested in). Vala would be an option in principle, but is in practice tied too closely to the Linux ecosystem.
JVM languages are a possible alternative (as you can distribute JVM bytecode directly), but are a no-go where a Java installation is not already available. Plus, C interoperability in Java is lacking. JVM programs also suffer from a fairly high startup time.
Red is currently not an option that I am considering; not only is the language not stable and was lacking essential features last time I checked, but it also depends on Rebol for building from source; while Rebol has technically been open-sourced a few years ago, the Rebol repository has been stagnating. Obviously, this may change in the future. (I also note that while homoiconic languages have interesting applications, most of the time the tradeoffs they have to make are the opposite of what I need.)
In the end, that means that I'm mostly using Nim and OCaml when I require native code; Scala where a JVM application is an option; or one of several interpreted languages.
Wow, thank you guys so much for the information!
I won't respond directly because college homework, but I think I will choose Nim over Haxe (and Red looks too far away). Y'all, plus a night's sleep, made me realize:
The ability to use GCC is critical for ease of porting Nim to other platforms. Haxe isn't elegant either, not least in its tacked-on macros, C++ backend afterthought, and inescapable(?) reference counting. OCaml doesn't sound much faster than Go (and don't get me started on Haskell or Racket). Nim's story may very well be like Rust's in the sense that it will get cleaner with time. A community's priorities certainly make a difference.
That Rebol thing is a good point too, although I am a fan of JSON syntax rather than a million types of brackets.
I apologize for my Aporia comment. I forgot it worked on Windows (32 bit).
Don't forget the best part of Nim's type system: arbitrary code can decide type compatibility. That's more powerful than dependent, uniqueness, and linear types combined (as long as it's done at compile time).
clean room (not messy GCC/LLVM) desktop/laptop compilation
What do you mean by this and why is this something that is important?
Oh, hi dom96. didn't see you there. LLVM has clear advantages over the nigh-unmaintainable mess that is GCC, but it's notoriously unstable version-to-version and difficult to build. I am unaware of a FOSS alternative to these two, so I'm predicting it'll take a programming language community to spearhead the next one (no thanks, Apple/Swift). Maybe Go 2.0 if Nim keeps the external compilation route.
You may also want to check out crystal lang. While nim is python inspired, crystal is ruby inspired.
All new languages have their pros and cons and it is best to try them yourself before deciding on a specific one.