Crystal: Fast as C, Slick as Ruby
blog.codeship.com
Crystal: Fast as C, Slick as Ruby
1–10 of 439 posts
Re: Crystal: Fast as C, Slick as Ruby
#2(0) Does Crystal have a lot of undefined behavior like C?
(1) Does understanding Crystal programs require a lot of trial and error just like in Ruby?
(2) How good a job does Crystal do at preventing me from shooting myself in the foot?
A language isn't to be judged just by the amazing programs you can write in it. (Turing-completeness and I/O facilities have that covered.) Far more important are the totally stupid programs that you can't write in it.
Re: Crystal: Fast as C, Slick as Ruby
#3The really important questions in any modern language: (0) Does Crystal have a lot of undefined behavior like C? (1) Does understanding Crystal programs require a lot of trial and error just like in Ruby? (2) How good a job does Crystal do at preventing me from shooting myself in the foot? A language isn't to be judged just by the amazing programs you can write in it. (Turing-completeness and I/O facilities have that…
Re: Crystal: Fast as C, Slick as Ruby
#4For now, if you want a fast language with the beauty and productivity of Ruby, check out Elixir [0] and its web framework, Phoenix [1]. I've been using Phoenix for a year, and it's the first framework that I've actually liked more over time. And I've been a web developer for a decade. With its recent 1.0 release, Phoenix is gaining a lot of momentum.
If you want some idea of the performance differences between Phoenix and Rails, see [2] and [3].
[1] http://www.phoenixframework.org/
[2] https://github.com/mroth/phoenix-showdown/blob/master/RESULT...
[3] http://www.phoenixframework.org/blog/the-road-to-2-million-w...
Re: Crystal: Fast as C, Slick as Ruby
#5Re: Crystal: Fast as C, Slick as Ruby
#6The Crystal website itself makes a more modest claim than "fast as C" under its language goals: "Compile to efficient native code", which it clearly does.
Re: Crystal: Fast as C, Slick as Ruby
#7The really important questions in any modern language: (0) Does Crystal have a lot of undefined behavior like C? (1) Does understanding Crystal programs require a lot of trial and error just like in Ruby? (2) How good a job does Crystal do at preventing me from shooting myself in the foot? A language isn't to be judged just by the amazing programs you can write in it. (Turing-completeness and I/O facilities have that…
Is undefined behavior a thing outside of C? Is that really something you should question rather then just assume that modern language have no undefined behavior?
Re: Crystal: Fast as C, Slick as Ruby
#8But it still has a GC :(. Rust has completely spoiled me with making it easy to minimize dynamic memory allocation and copies, and to know (almost always) deterministically when something will go away.
EDIT: I should also say that if you want to bash on Rust's lack of these things, 3 out of the 4 items I cited have solutions being actively worked on (either at planning, RFC, or implementation phase). I don't think Rust's sigils are going away any time soon, but I have no idea how you'd do that and preserve semantics anyway.
Re: Crystal: Fast as C, Slick as Ruby
#9Earlier quoted context omitted.
Is undefined behavior a thing outside of C? Is that really something you should question rather then just assume that modern language have no undefined behavior?
What happens if you try to mutate a shared object from two threads, without using mutexes and locks, in languages without either Rust's compiler-enforced ownership or a global interpreter lock?
Re: Crystal: Fast as C, Slick as Ruby
#10Earlier quoted context omitted.
What happens if you try to mutate a shared object from two threads, without using mutexes and locks, in languages without either Rust's compiler-enforced ownership or a global interpreter lock?
ConcurrentModificationException?