5 ms·
Anyone compare Nim to Crystal? Both are AOT languages with syntax inspired by dynamic languages (Python & Ruby). Nim transpiles to C and Crystal uses LLVM. I've
by throwaway7645 10y ago
Anyone compare Nim to Crystal? Both are AOT languages with syntax inspired by dynamic languages (Python & Ruby). Nim transpiles to C and Crystal uses LLVM. I've been playing with Nim, but I have a feeling Crystal will catch on quicker.
- killin_dan 10y agoCoC, bad compiler, bad type system, no formal proofing whatsoever, some of documentation reads like someone who knows English as a second or third or fourth language wrote it, in some cases it's just plain wrong. Elixir has already taken most of the ruby mindshare, the crystal team really isn't hacking it when it comes to presenting why crystal should be used instead of ruby except for speed. That its faster is the only viable motivation currently. I don't know anything about nim, so I can't really compare it. I wrote some compiler plugins and utilities for crystal at my company, but I ended just rewriting the component in ruby, and it runs hourly with JRuby. I hope Ruby3 gets optional types a la Dart, and a code conversion tool. Those two things would revive the entire ruby universe. Edit: last time I touched crystal was 6-7 months ago, but I doubt anything has changed. Edit edit: not an elixir fanboy. It sucks too, but at least it compiles down to BEAM so if I'm writing erlang I don't have to actually touch it as long as it works. The elixir astroturfing is out of control lately. It's cool, it ain't THAT cool.
- _raul 10y agoI've started to transition from Ruby to Crystal for my pet projects and haven't hit any serious issues so far. Since you seem to have much more experience than I do, would you mind elaborating a bit on the issues you found and why you think the compiler and type system are bad?
- Svenskunganka 10y agoI wouldn't count on it, judging by his previous comments he seems to prefer drive-by snipes over discussions. The fact that he made so many claims about how bad Crystal is without even attempting to explain why doesn't really make him seem credible. And the icing on the cake gotta be how he nitpicks on very minor grammatical errors made by non-native english speakers which he also seems to be completely unaware of that they are. Even I - a Swedish person - fully understand every sentence I've read so far, and English is not my primary language either. I wouldn't take this guy seriously until he brings forth some constructive criticism.
- amorphid 10y agoElixir is by far my favorite language out of the 6 I've seriously tried (Elixir, Ruby, JavaScript, Python, Java, Bash). I'm gonna dive into Go in near future.
- name_for_now 10y agoI would honestly be very surprised if you said Bash was your favorite of the 6.
- yawaramin 10y ago> ... some of documentation reads like someone who knows English as a second or third or fourth language wrote it, ... Um, what's wrong with that? Not everyone gets to learn English as their first language, do their efforts deserve to be discarded just because of that? I mean, I could point out that your grammar ('some of documentation') invalidates your entire comment, but that's kinda silly.
- 35bge57dtjku 10y ago> I could point out that your grammar ('some of documentation') invalidates your entire comment, but that's kinda silly. He's not writing the hopefully high profile documentation for a project that people want to be used, ffs. No, it doesn't deserve to be discarded because of that, but it's clearly suboptimal.
- yawaramin 10y agoYou make it sound as if this version of the documentation is set in stone, forever. Can't small projects improve their documentation as they grow in popularity? E.g. do you think that Linus Torvalds' Linux documentation was always up to the highest standards of Strunk & White's prescribed English?
- williamgb 10y agoI absolutely do not share the opinion of person to whom you are replying, but to state that their comment is invalid due to a trivial typo is unnecessary, and has potential to be incendiary.
- yawaramin 10y agoI mean, that's why I said: > ... but that's kinda silly.
- williamgb 10y agoWhat point were you trying to make? You made one great statement, with which I agree fully, but followed with statement drawing a comparison between the documentation for a funded open-source project, and a typo in a comment thread. It's not just "kinda silly", it's utterly asinine.
- RX14 10y ago>CoC I'm sorry, what does that mean? >bad compiler, bad type system I'd love to hear some feedback from you about the compiler and type system, so that we can discuss and improve them. >no formal proofing Ary has expressed interest in formally defining crystal's type system, but its understandably far down the list of priorities.
- zem 10y agoi think nim has better compiler options (in particular, i don't know if it has already achieved go-like cross-compilation of static binaries, but if not it's further along that road than crystal is). https://nim-lang.org/docs/nimc.html https://nim-lang.org/docs/nimc.html meanwhile, crystal does not even support windows yet. https://github.com/crystal-lang/crystal/issues/26 https://github.com/crystal-lang/crystal/issues/26
- pjmlp 10y agoGo-like cross-compilation only works with pure Go libraries that don't make use of either syscalls or cgo.
- dom96 10y agoI keep hearing praise over how easy it is to statically compile Go applications. Does the same apply to static compilation? Is it only easy when using pure Go libraries?
- zem 10y agoaccording to https://dave.cheney.net/2016/01/18/cgo-is-not-go https://dave.cheney.net/2016/01/18/cgo-is-not-go > It is possible to compile a Go program entirely statically, but it is by no means simple and shows that the ramifications of including cgo in your project will ripple through your entire build and deploy life cycle. (that article also contains the beautiful line "You’re not writing a Go program that uses some logic from a C library, instead you’re writing a Go program that has to coexist with a belligerent piece of C code that is hard to replace, has the upper hand negotiations, and doesn’t care about your problems.")
- pjmlp 10y agoUsually those praises come from young developers that never developed software back in the days when static linking was the only option. So they look at Go's static linking, their experiences using -static in gcc and glibc, and think they just found something magical. It is interesting the amount of knowledge that gets lost within a few generations.