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.
[ Parent
| on HN ]
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.