5 ms·
Check out Crystal - Its statically typed, compiled, and a near one to one implementation of Ruby. https://crystal-lang.org https://crystal-lang.org
by jtms 8y ago
Check out Crystal - Its statically typed, compiled, and a near one to one implementation of Ruby. https://crystal-lang.org https://crystal-lang.org
- aantix 8y agoIs it backwards compatible with Ruby?
- arthurcolle 8y agoNo but the syntax is almost identical which makes it reality easy to pick up for small use cases, at least last time I looked at it
- arthurcolle 8y ago*really
- runjake 8y agoTo jump onto the other reply. No, it's not and while Crystal has syntax similar to Ruby, it is different enough that you cannot approach it like Ruby. It looks like a duck, but it does not quack like a duck. This is not a diss. Crystal is good.
- yxhuvud 8y agoNo. And it varies wildly - some Ruby files may run with just a couple characters (or even none) being different, and other may require a total rewrite.
- chrisseaton 8y ago> a near one to one implementation of Ruby This isn't the case at all. It has completely different semantics (for good reasons).
- Doctor_Fegg 8y agoIt also has different semantics for bad reasons. For example, Ruby’s if ... then ... else (single-line) has been deliberately removed because the devs have a mild preference against it. For someone like me who’s been writing that since BASIC in 1981 or so, that’s a surprisingly big PITA. I like Crystal, but there are a few too many needless gotchas for it to be comfortable.
- jtms 8y agoI do not agree that it "has completely different semantics". It has far more in common than not. Its close enough that I, as a long time Ruby developer, had no issues being productive with it in a very short amount of time. The syntax and API are similar enough that most Rubyists are going to be very happy and comfortable. Then when they see the benchmarks they will be even happier!