3 ms·
Some of these are wrong to. You can encounter issues with #define #define $(a,b) if(a)b;else due to not having brackets. So it's just extremely lazy to.
by maldev 11mo ago
Some of these are wrong to. You can encounter issues with #define
#define $(a,b) if(a)b;else
due to not having brackets. So it's just extremely lazy to.
- jacquesm 11mo agoThis should not be downvoted, this sort of error is indeed a very easy one to make when dealing with the C pre-processor. > Some of these are wrong to[o] <- that needs an extra 'o' > due to not having brackets. <- that one is fine > So it's just extremely lazy to[o]. <- that needs an extra 'o' too 'to' comes in two versons, 'too' and 'to', both have different meanings.
- throwaway150 11mo agoGood grief! Are we really so insufferable as software developers that we can't just appreciate a brilliant article about the work of a remarkable computer scientist without nitpicking every supposed "bad practice"? The whole point of the piece seems completely lost on some readers. Yes, we all know that #define $(a,b) if(a)b;else is questionable. I don't need a crash course on C macros in the comments, thank you. The author already acknowledges that Whitney's style is controversial. Do we really need to keep rehashing that point in every comment, or can we finally focus on how all this unconventional code fits together beautifully to form a working interpreter?
- jacquesm 11mo agoI wouldn't have a problem with it, if the implication wasn't that the author became smarter as a result of reading this code. That's my whole beef with it. 'Hey, look at this interesting way of using the CPP to create a DSL' I'm fine with that. But this is precisely what aspiring C programmers should avoid at all costs. It's not controversial. It's bad.
- oh_my_goodness 11mo agoStill, since the article already contains this warning, some people might argue that it's unnecessary for us to add it as a response to every comment here.
- josephg 11mo ago> I don't need a crash course on C macros in the comments, thank you. This is an enduring great & terrible thing about sites like HN and reddit: As people become more senior & experienced, junior engineers come in to fill the ranks. You and I don't need a crash course on C macros in the comments. But I promise you, a lot of people here have no idea why #define $(a,b) if(a)b;else is a weird C macro. How much should HN cater to junior engineers?
- throwaway150 11mo ago> How much should HN cater to junior engineers? The assumption that HN should cater to junior engineers is curious. It implies a purpose the site has never claimed to have.
- rramadass 11mo agoIt is nothing to do with seniors vs. juniors but merely a lack understanding as to the intent behind somebody's work. When an acknowledged expert does something out of the ordinary you ask why and try to grasp his pov rather than pointing out obvious trivialities.
- rramadass 11mo agoYeah, I feel the same way you do, but then console myself with this quote - “Mediocrity knows nothing higher than itself; but Talent instantly recognizes Genius.” (from The Valley of Fear by Arthur Conan Doyle). People have a silly need to point out the obvious as a crutch to their ego.
- deleted 11mo ago[deleted]
- deleted 11mo ago[deleted]