News for hackers. Stuff that matters.
Re:Moving from Ruby to Rust by realusername on Friday February 15, 2019 @12:09AM (#19168585)
Not allowing NULL & having weak metaprogramming options sounds like advantages to me. you still have metaprogramming using language templates & scope shadowing, that's not at runtime but it's clearly good enough.

The problem with Crystal is more with the small community than the concept itself which is pretty good IMO.

Re:Moving from Ruby to Rust by james_s_tayler on Friday February 15, 2019 @01:10AM (#19168823)
I'm not feeling it. Compile time only metaprogramming just doesn't feel powerful enough. Just a personal thing.

I'm definitely a fan of Crystal of though as a project and would really like to see a bigger community and more libraries etc.

Re:Moving from Ruby to Rust by realusername on Friday February 15, 2019 @02:30AM (#19169140)
They don't do it because runtime metaprogramming has a lot of disadvantages, it's difficult to optimize so it runs poorly, it throws away the static typing out of the window and it's difficult to debug. I spent hours debugging Rails code in the past because of the layers of monkey patching.
Re:Moving from Ruby to Rust by james_s_tayler on Friday February 15, 2019 @03:24AM (#19169357)
It also has a lot of advantages. It's as powerful as it is dangerous.

The real reason they don't do it is because they can't. It's inherently unsafe. In order to always be sure something is never null you have to be aware of what all it's inputs are so you can reason about it. That's not possible with runtime metaprogramming techniques.

I dunno I guess I just think it's an odd choice. Don't get me wrong, it's a neat experiment and I value it. I'm just slightly miffed that that particular experiment had to mixed in with what amounts to a statically typed language with the beauty and simplicity of Ruby but the friendliness and discoverability of static typing.

Re:Moving from Ruby to Rust by galfarragem on Friday February 15, 2019 @04:20AM (#19169559)
> would like to see a bigger community and more libraries

Better Windows support could make wonders.