top | item 36900405

(no title)

iraliaf | 2 years ago

why?

discuss

order

the_sleaze9|2 years ago

It's a foot gun (incoming strong opinion)

The single most difficult thing in software development is the fact that the system doesn't exist, it is defined by mystical incantations, and we work on that invisible system by changing the instructions to build it.

Anything that makes the understanding or "building" that system mentally is no-go.

Flashback to one of my favorite debugging stories where an entire java code-base was meta-programmed into existance at runtime and would constantly throw errors to lines of files that didn't exist.

revscat|2 years ago

And yet without it we wouldn’t have Rails.

Broad proscriptions such as this almost always set my teeth in edge. Sure, meta programming can be a foot gun. But it can also be a way to cleanly achieve specific goals. Metaprogramming should by no means be the first tool reached for, but throwing out the baby with the bath water is an overcorrection.

It also means you are losing out on a significant portion of what makes Ruby Ruby.

Kamq|2 years ago

> Flashback to one of my favorite debugging stories where an entire java code-base was meta-programmed into existance at runtime and would constantly throw errors to lines of files that didn't exist.

Lombok?