Hacker News new | ask | show | jobs
by aryastark 4444 days ago
I just don't know how to reconcile the fact that HN tore the C language a new arsehole over "goto fail", and is now back to praising macros.

Macros need to be tossed into the dustbin of history, right next to self-modifying code and other cute but dangerous hacks.

2 comments

HN is not one person.

There are many people here, from many backgrounds, with many different perspectives. Almost all languages have proponents here (with COBOL the possible exception), and all languages have detractors here.

Look, I don't have time for your childish pedantry. There were entire articles on the front page of HN blaming C for having poor language design on the issue of "goto fail". Now there is an article promoting macros in C, no less.

HN may not be one person, but does have a front page as a result of aggregate behavior.

Why, I think he raised a very important point. HW is not one person. People have different backgrounds and different needs. Sometimes, C macros are the the best you have. Just because they're generally to be avoided doesn't mean they should never be used.
> Look, I don't have time for your childish pedantry

Please don't make personally aggressive comments on Hacker News.

You can delete the "aryastark" account and all comments.
C macros are a cute but dangerous hack. But this software implements Lisp macros for C. Lisp-style macros are safe and nonhacky. The main feature that allows this is `gensym`, which lets you store values in variables that are guaranteed to not name-clash.

Also, the “goto fail” issue had nothing to do with macros. So people might hate C’s block syntax while loving other features such as macros. People can hate parts of a language and like other parts. Like the author of the book JavaScript: The Good Parts, who likes JavaScript, but recommends against using certain features of it.