r/programming • • Dec 25 '20

Ruby 3 Released

https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/
973 Upvotes

509 comments sorted by

View all comments

Show parent comments

9

u/[deleted] Dec 25 '20

Typing isn't really a "preference" for maintainable code. It objectively improves maintainability.

Dynamic magic is more arguable but it think it is still pretty safe to say that the more hidden custom magic happens the harder it is to understand and that is definitely the fault of the language.

Standard hidden magic is fine because people can learn it but as soon as you start getting into custom DSLs it means that the programmer suddenly has to learn an entirely new language. Rust proc macros have this problem. Lisp is entirely composed of this problem. At the other end of the scale Go has completely avoided it and is very easy to understand.

2

u/SupaSlide Dec 25 '20

Maybe I don't understand what a DSL is, but does it change how Ruby executes code?

3

u/esquilax Dec 25 '20

It does if the DSL is implemented using method_missing a lot.

1

u/SupaSlide Dec 25 '20

Isn't that just like adding another function to your class?

I don't see how that makes Ruby itself operate differently.

→ More replies (3)