Hacker News new | past | comments | ask | show | jobs | submit login
"Macros are a net drawback" (csail.mit.edu)
22 points by silentbicycle on April 2, 2009 | hide | past | favorite | 4 comments



The best quote was saved for last:

"Q: What do you get when programmers design a language while trying to get something else done?

A: PHP"

Covers it all really.


This seems just like the general argument against extreme cleverness. Don't be cleverer than you must, or nobody else will understand it and you won't be able to debug it.

I think relatively simple macros are quite useful, but I agree with his argument for complex ones. Where the line is between handwavy categories like "relatively simple" and "complex", is beyond me at the moment.


Right. He's not saying, "macros are bad", he's saying, "macros often lead to code that's very hard to maintain, and in the end many are more trouble than they're worth". You can still do very powerful things without them in most cases; as far as I recall, SICP has no macros.

Code conventions go a long way, though - with-* macros are easily understood, for example.


"Macros Considered Harmful"

"Macros: They're for Nazis"

"Macros are for Dirty Hippies"

"Macros are Just Like Goto"

Solid, rational arguments against macro use. Very readable/understandable outline. Interesting topic.

I wish slideshare looked like this. :-P




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: