Live data from Hacker News

Crystal: Fast as C, Slick as Ruby

blog.codeship.com

21–30 of 439 posts

Re: Crystal: Fast as C, Slick as Ruby

#21
post #14

Earlier quoted context omitted.

That's hardly any better than undefined behavior. It's not the program you want to write, under any possible circumstance, and the language should tell you so.

It is significantly better than undefined behaviour, as it results in a noisy failure rather than silently incorrect results. Compile-time failures are best, sure, but I'll always take an exception over what is essentially data corruption.

> It is significantly better than undefined behaviour, as it results in a noisy failure rather than silently incorrect results.

This might be true in a deterministic setting, since the likelihood that a test suite will find the error is very high. But in a non-deterministic concurrent setting, throwing an exception that might be only caught once in a blue moon is just as bad as not doing anything about errors.

Re: Crystal: Fast as C, Slick as Ruby

#22
post #14

Earlier quoted context omitted.

That's hardly any better than undefined behavior. It's not the program you want to write, under any possible circumstance, and the language should tell you so.

It is significantly better than undefined behaviour, as it results in a noisy failure rather than silently incorrect results. Compile-time failures are best, sure, but I'll always take an exception over what is essentially data corruption.

[deleted]

Re: Crystal: Fast as C, Slick as Ruby

#23
The Fibonacci comparison is a poor example of performance gains because Ruby is using large number data types to ensure the correct result. This is according to the crystal language website itself.

"However, Crystal might give incorrect results, while Ruby makes sure to always give the correct result."

https://crystal-lang.org/2016/07/15/fibonacci-benchmark.html

Re: Crystal: Fast as C, Slick as Ruby

#24
post #4

Looks very nice. I hope it gains momentum. For 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…

Elixir is not a fast language. Not even close. Yes, it handles concurrency and parallelism beautifully which in turn enable distributed applications to perform quite well. But the language itself is significantly slower than Crystal / Rust / Go / Swift. It's not in the same category at all.

That said, it's a great language worth recommending.

Re: Crystal: Fast as C, Slick as Ruby

#25
post #4

Looks very nice. I hope it gains momentum. For 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…

Elixir gets plugged so often in other-language threads - whether it's Julia or Ruby or, like here, Crystal - that if it wasn't FOSS I'd have decided it's being astroturfed.

I guess it's a good thing that people like it so much, but it's really starting to feel marketing-y by now.

Re: Crystal: Fast as C, Slick as Ruby

#26
post #14

Earlier quoted context omitted.

It is significantly better than undefined behaviour, as it results in a noisy failure rather than silently incorrect results. Compile-time failures are best, sure, but I'll always take an exception over what is essentially data corruption.

> It is significantly better than undefined behaviour, as it results in a noisy failure rather than silently incorrect results. This might be true in a deterministic setting, since the likelihood that a test suite will find the error is very high. But in a non-deterministic concurrent setting, throwing an exception that might be only caught once in a blue moon is just as bad as not doing anything about errors.

Corrupting data with no warning or visible signs is far, far worse than crashing the application.

Re: Crystal: Fast as C, Slick as Ruby

#28

The 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…

You could've answered those questions yourself if you actually looked into the language, but you didn't. You instead offered facile and superficial judgement. If you have complaints, state them. Speaking in generalizations just sounds like whining.

To be clear, I have no strong opinions about Crystal and will probably never use it. But comments like yours are simply grandstanding and it's annoying that they are confused for contribution.

Re: Crystal: Fast as C, Slick as Ruby

#29

Earlier quoted context omitted.

> It is significantly better than undefined behaviour, as it results in a noisy failure rather than silently incorrect results. This might be true in a deterministic setting, since the likelihood that a test suite will find the error is very high. But in a non-deterministic concurrent setting, throwing an exception that might be only caught once in a blue moon is just as bad as not doing anything about errors.

Corrupting data with no warning or visible signs is far, far worse than crashing the application.

Data corruption is possible even in memory-safe languages, anyway. For instance, invariants of data structures might be violated.

If you're really serious about data integrity, ask yourself - does any language even attempt to describe data structures stored on disk?

Post reply on HN