News for hackers. Stuff that matters.
Re:Responsible Monkeypatching in Ruby by chousuke on Saturday August 28, 2021 @03:06AM (#28336194)
My first experience with Ruby was writing rspec tests and chef recipes, and I can't say I was very happy when I had to debug that code. It's given me a deep aversion towards any Ruby DSL that still persist. I will work with Ruby if I have to, but I am not happy about it.

The way Ruby does metaprogramming makes debugging extremely frustrating because your stacktraces will contain references to methods that exist nowhere. Good luck then trying to find where they're defined so you can understand how they work.

I have a very strong opinion that generating methods at runtime is a terrible feature that should be used only when nothing else can be done.

There are no comments on this comment yet.