Hacker News new | ask | show | jobs
by timonoko 21 days ago
I really do not understand this whining and downvoting.

In so-called real life somebody has to live with the malformed macro, whose only purpose is to beautify the code.

I even made un-macrofier, which deleted all macros and replaced instances with macroexpand, because slight adjustement of code resulted mysterious errors cause by nasty macroes.

And lets not talk about Common Lisp loop macro, which was probably scooped up from latrine of hell by the Devil himself.

1 comments

Nobody has to live with a malformed macro because they can just observe what code expansion it is performing and write their own which does it better. (Speaking of CL loop, some people have resorted to this solution of actually dragging an implementation of loop into their application, to avoid issues with a vendor's loop, or behavioral differences among different ones---yes, loop has this, unfortunately).

The malformed macro situation is a lot better than the situation of a malformed API function to which you don't have source code.

Anything that is formed can be malformed. DNA can be malformed, leading to malformed fingers someone actually has to live with; so let's not have fingers.