13 ms·
Crystal 1.2.0
- sharno 5y agoNo windows support is such a bummer
- hresvelgr 5y agoAs far as I've seen, Crystal's only merit seems to be is that it's more or less Ruby but statically typed and compiled. In the interest of shedding my ignorance maybe someone can tell me why it's worth trying? From my observation it's features don't seem that differentiated from other modern languages like Rust or Zig.
- furi 5y agoThe type system is so strict that if it compiles it will almost always run. Nil is a type that must be explicitly ruled out before you can use a potentially nilable value. But it avoids the manual memory management/borrow checking/pointer vs. reference vs. value unpleasantness of Zig/Rust/C++. It's probably most comparable to Java/C#, but something about the design of the syntax and standard library makes it much more appealing than either of those for me.
- ch4s3 5y agoI would guess it’s ergonomics.
- 41b696ef1113 5y ago>it's features don't seem that differentiated from other modern languages like Rust or Zig. I think Crystal is going more for the space of Go. Compiled language that is performant without manually dealing with memory or the borrow checker. As someone who is disappointed with Go, I would love for a language (Nim or Crystal seem best positioned) to fill this niche.
- valenterry 5y agoHow about Haskell or Scala?
- regularfry 5y agoThe type system looks very simplistic compared to either.
- valenterry 5y agoI thought Crystal's typesystem is actually rather sophisticated, especially compared to Go. Maybe not as advanced as Scala/Haskell but not too far.
- amw-zero 5y agoReally, what modern language has any real unique features? Rust has an actual unique feature (borrow checking). Other than that, they just pick slightly different subsets of what has been around since 1970. That being said, Ruby for me always felt like the syntactic ideal. [1,2,3].map { |i| i + 2 } The combination of data structure literals, trailing closures (blocks), expressions by default, dropping parens - it is ideal for me. That’s subjective, so, no point in discussing that, I can’t be swayed. But, what I always hated about working on large Ruby apps was a lack of types and concurrency. Add those on, and that’s a language that I would really enjoy. That’s what it brings to the table. When people like Ruby, it’s because the syntax can be legitimately pleasurable to work with. Not true of any other language. Add on the more industrial aspects like static types, concurrency, and performance, and you have a compelling language. If that doesn’t seem interesting to you, that’s because it’s not for you.
- weatherlight 5y agoI feel like Crystal isn't as popular as it should be. I did part of last years Advent of code in it, and it was very easy to convert Ruby solutions to working Crystal solutions that were as fast as the the Go solutions my buddy had submitted. It's a really impressive language, I hope it doesn't fizzle out.
- chshrct 5y agoWhen you have Go you don't need another similar language
- weatherlight 5y agoExcept then you're writing Go.
- dunefox 5y agoBut then I'd have to program in Go.
- dleslie 5y agoCrystal, Carp and Nim are my "I hope these catch on" languages. Each has an elegant and intriguingly modern approach to performance targeting programming.
- dunefox 5y agoI still hope for Common Lisp 2: Electric Boogaloo.
- vips7L 5y agoD is the one for me.
- sidkshatriya 5y agoWhy is D the one for you? Between Crystal, Zig, Nim and D it does seems that D is the most "mature" and production ready...
- brigandish 5y agoOnce you get used to the type notation - which is far better than any of the ones I've seen bolted on to Ruby - it really is a breeze getting stuff done in Crystal compared to Ruby. The only downside I've encountered so far is, as with any newer language, the number of 3rd party libraries available, but I think this is balanced by the easier availability of C libraries (far easier to use than for Ruby) and considerations like portability and speed etc. Now, I pick Crystal before Ruby where possible, which is the vast majority of the time.
- ch4s3 5y agoI don't really ever intend to use crystal after jumping from ruby to elixir, but I'm happy to see it moving forward.
- weatherlight 5y agoI use Elixir as well and am in love with the language. Crystal seems better suited for building command line tools, or stuff like ESbuild.
- ch4s3 5y agoThat seems reasonable to me, though I haven't really tried.
- prydt 5y agoCrystal is definitely one of my favorite compiled languages. It feels like a happy medium between a dynamic language like Python and something fast but rigid like C++. The only real downside I can see is that the ecosystem is very small and the language is not as popular.
- pixelgeek 5y agoEvery website for a new language should have a prominent page that explains why you would want to use the language and what it is intended for.
- ricardobeat 5y agoIt’s hard to distill everything into one (or even a few) sentences. And they might not have a particular target. What is C intended for? Crystal takes the “designed for humans” part of Ruby, and applies it to a typed and compiled language that is extremely fast.
- williamstein 5y agoPut 'Crystal takes the “designed for humans” part of Ruby, and applies it to a typed and compiled language that is extremely fast.' right on the top of the landing page! Earlier, I looked over the whole page for a while and couldn't figure out what the point is; your description is exactly what I was looking for.
- chillfox 5y agoIt used to say something along the lines of "Fast as c, slick as Ruby"
- BenjiWiebe 5y agoI guess I'll have to give Crystal a try then. My two favorite languages are C and Ruby. :)
- pixelgeek 5y agoThat works.
- awb 5y agoThe Crystal homepage used to feature a tagline like “Slick as Ruby, Fast as C” or something similar.
- PostThisTooFast 5y agoMaybe we'd give a shit if you'd said what "Crystal" is.
- DeathArrow 5y agoThe managed to make it usable under Windows? Last time I checked it I was forced to run it on WSL.
- haarts 5y agoWindows support is an active area of focus but not there yet.
- regularfry 5y agoI do love this, and I'll probably spend the weekend playing with it, but I do wish we'd stop making languages that are nailed to a single core.
- mega-tux 5y agoYou can enable the flag to turn on experimental parallelism https://crystal-lang.org/2019/09/06/parallelism-in-crystal.html https://crystal-lang.org/2019/09/06/parallelism-in-crystal.h...
- DRVTiny 5y agoI am using Crystal for my small projects (microservices), as a script language (as a replacement for Perl), as a parallel computational language for math. And yes, with it's amazing runtime speed, powerful embeded macro-language and expressive syntax - it is probably the best language i've ever used . But Crystal's slow compilation time is a "breaking things" for big projects. Developers, please fix this!!
- xyproto 5y agoI think Crystal is underrated as a language that can be used for teaching programming. The syntax is clear and has very few confusing aspects for beginners.
- mekster 5y agoWhat is the strong point of Crystal besides having Ruby grammar?