| ▲ | IshKebab 2 days ago | |
> Ruby is not known for its speed-first mindset though. Or its maintainability, and this is one of the big reasons why. Methods and variables are dynamically generated at runtime which makes it impossible to even grep for them. If you have a large Ruby codebase (say Gitlab or Asciidoctor), it can be almost impossible to trace through code unless you are familiar with the entire codebase. Their "answer" is that you run the code and use the debugger, but that's clearly ridiculous. So I would say dynamically defined classes is not only bad for performance; it's just bad in general. | ||
| ▲ | psychoslave 2 days ago | parent [-] | |
That's yet an other topic, as monkey patching can definitely be explicit in ruby. The dynamically generated things at runtime are generally through the catch all method missing facility that can be overwritten. This can also be done in, say, PHP. It just that the community is less fond of it. Not sure about what most popular ahead of time oriented languages expose as facility in this area, obviously one can always even decide to generate automodifying executable. There is nothing special about ruby when it comes to go into forbidden realms, except maybe it doesn't come to much in your way when you try to express something, even if that is not the most maintenance friendly path. | ||