logoalt Hacker News

philipallstarlast Wednesday at 3:40 PM1 replyview on HN

How can you declare new syntax in C++? Wouldn't it just be a function call?


Replies

AnimalMuppetlast Wednesday at 3:56 PM

Yes, a function call. Not new syntax. But as a function, it would be trivial to add to a library.

My point was that you can often get the effect you want with no new syntax. (Cue 10,000 replies that state "but you can't get this effect without new syntax!" Perhaps not. Many of those tend to be rather contrived, though. I'm more sympathetic to the argument that new syntax would make something less clumsy. If it's something you need to do a lot, that matters.)

show 2 replies