Nim vs Crystal is an interesting read if not to just compare syntax (three articles span 3 years so I wonder how much has changed since): https://framework.embarklabs.io/news/2019/11/18/nim-vs-cryst...
Crystal 1.0 – What to expect
281–290 of 351 posts
Re: Crystal 1.0 – What to expect
#282Earlier quoted context omitted.
> I’ve never declared a variable and not simultaneously thought “this is going to be a float, always a float, never not a float.” Never written generic/template code? Making that much easier is one of the main benefits of dynamic typing.
It's possible—nay likely—that I don't understand the true value of generics. It's something that I've looked into on occasion and it never seemed all that useful to me. Most examples I've come across in the past were C++ and seemed like formalised workarounds for deficiencies in the C++ type system rather than being actually useful. I'm sure I've failed to grok them—or based on the code I write I'm not the target aud…
Re: Crystal 1.0 – What to expect
#283Earlier quoted context omitted.
Also, it produces binaries (probably similar to golang) which are a reasonable size considering there is a garbage collector. No giant interpretors or VMs required. And macros.
What is the compilation speed like? EDIT: also forgot to ask if Crystal has a "killer app" yet? Ruby had Rails, Python had scipy/pandas(several others), Rust had servo etc.
Re: Crystal 1.0 – What to expect
#284Re: Crystal 1.0 – What to expect
#285Earlier quoted context omitted.
You can group languages in different ways. VM vs native is one way, but you can also go by the level of abstraction they provide, which very much puts them in the same category. Also, this debate comes up every time, but ARC is widely classified as a form of garbage collection, just not a tracing one. It is transparent and automatic to the user. (Well, apart from cycles)
I disagree with that classification, as there's no "garbage" state for references as they are destroyed immediately. All garbage collecting languages on the other hand have period of time where the references are intact but marked as garbage. FWIW Chris Lattner, the language creator, put Swift into a non-GC camp.
Re: Crystal 1.0 – What to expect
#286Earlier quoted context omitted.
> I’ve never declared a variable and not simultaneously thought “this is going to be a float, always a float, never not a float.” Never written generic/template code? Making that much easier is one of the main benefits of dynamic typing.
It's possible—nay likely—that I don't understand the true value of generics. It's something that I've looked into on occasion and it never seemed all that useful to me. Most examples I've come across in the past were C++ and seemed like formalised workarounds for deficiencies in the C++ type system rather than being actually useful. I'm sure I've failed to grok them—or based on the code I write I'm not the target aud…
With a
createMapWithStringKey(T arg) -> Map
You can keep strong type info with AType a
var b = createMapWithStringKey(a)
// b is for certain a MapRe: Crystal 1.0 – What to expect
#287Re: Crystal 1.0 – What to expect
#288Earlier quoted context omitted.
What is the compilation speed like? EDIT: also forgot to ask if Crystal has a "killer app" yet? Ruby had Rails, Python had scipy/pandas(several others), Rust had servo etc.
Why is that important given Moores law and fast developer workstations? Everyone seems so preoccupied with compile speed for Crystal.
Re: Crystal 1.0 – What to expect
#289Earlier quoted context omitted.
Fast compilation times are one of the best things from the languages I love. I’d really love to see OCaml get true parallelism, green threads, and a decent HTTP server story. Then, I don’t think I’d look anywhere else.
Are you saying Crystal has fast compile times or that it doesn't? You seem to be saying that it does, that that is one of the things you love about it but others below are saying it is slow.
Re: Crystal 1.0 – What to expect
#290Earlier quoted context omitted.
C# ? Not complicated at all. In fact it's currently one of the most cross platform language/runtime in existence after .NET Core appeared, and now more than ever with .NET 5.0. I even managed to AOT compile code and run it without a trace of .NET. Just amazing.
C# is a really good language, but I had nothing but problems trying to develop with it on Linux exclusively. MonoDevelop doesn't support Linux anymore since a bunch of proprietary components were added to it (and this isn't even mentioned on its homepage), so you have to use a community fork. That didn't bode well for me. The fork didn't have packages for my distro and I couldn't get it to compile for two hours. VS C…