5 ms·
There's 3 languages in the same class. Julia, Nim and Crystal. I'm specifically curious about Crystal vs. Nim. Benchmarks show that crystal is pretty much fast
by deltaonefour 4y ago
There's 3 languages in the same class. Julia, Nim and Crystal.
I'm specifically curious about Crystal vs. Nim. Benchmarks show that crystal is pretty much faster, but I'd also like to know the advantages of why someone would choose Nim over Crystal I'm looking for reasoning that is deeper then just superficial language syntax differences.
Has anyone extensively used both? I would like an unbiased view from someone who has used both as opposed to someone who's only used one.
- eddyschai 4y agoWhat class of languages are those?
- deltaonefour 4y agoscript style languages specifically designed with modern concepts and to be highly performant. V8 is likely the fastest interpreter (javascript) for a script style language but these languages should be a step above and beyond v8 in terms of performance.
- michaelsbradley 4y agoNim is not a "script style language". By default it compiles to C, and the generated C sources are then compiled with gcc or clang, etc. As it says on nim-lang.org, "Nim is a statically typed compiled systems programming language".
- deltaonefour 4y agoI know. But the syntax is still script style. The syntax is more closer to Python then it is to C++.
- rishav_sharan 4y agoGonna copy paste an old comment of mine: ----- Syntax wise: Nim is to python what Crystal is to Ruby Capability wise: both are incredibly powerful general purpose languages. Crystal is fully OOP, while Nim has a more functional/procedural bent. Nim is better for DSLs and has a fascinating macro system. For system language use, Nim is a better choice as you can use it with its Arc GC or no GC at all. Perf wise, Crystal seems to be marginably faster in most benchmarks. Though at that level the difference isn't much. crossplat wise, Crystal has no "official" windows support (and you cannot do webdev on it) while Nim has. Ecosystem wide: Both are young languages and the ecosystems are tiny. Crystal has more and better options for webdev. Nim, IMO, is better for games, console apps etc. Tooling wise; crystal IDE tools are far behind that of Nim. But both are terrible when you consider any decent language out there. Ecosyt Personally I like Crystal a lot due to its type system and syntax but you can't go wrong with either language.
- deltaonefour 4y agoPerfect! Thanks!
- speps 4y agoOne major issue that stopped me from trying Crystal is that Windows support is being worked on since 2013 and is still WIP as of 2022 with major language features still not working... https://github.com/crystal-lang/crystal/issues/5430 https://github.com/crystal-lang/crystal/issues/5430
- christophilus 4y agoLast I used it, Crystal’s compilation times are brutal. They may have fixed this (for non-production / dev iteration) with their work on an interpreter, though. After using fast compilers, it’s really painful to go back to slow ones. That said, Crystal is a really great language, and I plan on tinkering with it again soon.
- forgotpwd16 4y agoJulia isn't in the same class and workflow usually differs significantly from the others.
- deltaonefour 4y agoIt is. Ruby and python are in the same class despite python being more data oriented. Julia is the same thing. Data oriented.
- forgotpwd16 4y agoRuby and Python aren't data oriented. Python specifically was designed and used as system scripting language and Ruby was designed as an improved Python. Python only came to be used for analytics (as well as web and app development) because people made libraries for it. It could have been another language. Nim and Crystal could be utilized to write the underlying libraries (being performant static languages) but it will be hard to serve as exploratory frontend like the previous due to lacking interactivity. In contrast Julia can fulfill both the role of the underlying and the frontend language.
- deltaonefour 4y agoPython is data oriented. Nobody is talking about origins of programming languages. That is a separate topic. We are talking about the language as it stands now based on how it's used and the ecosystem. I never said Ruby was data oriented.