Hacker News new | ask | show | jobs
by sodapopcan 1283 days ago
Metaprogramming is powerful for making really nice, easy-to-use _libraries_. It shouldn't ever be used for business logic. Ever. Unless you're going to go all in and make a DSL for your business, but I don't know of anyone who actually does that.
2 comments

Businesses are typically the ones hiring programmers (especially Ruby ones).

The smart programmers want to write libraries. This is actually a problem for businesses, because they often don't need libraries.

I agree. That’s a whole blog post or essay worth of shit to unpack there, though.
method_missing is only one tool in the metaprogramming toolbox (just probably the worst one). i wouldn't necessarily throw out the whole toolbox, particularly with ruby.