Hacker News new | ask | show | jobs
by sodiumphosphate 4774 days ago
I wish someone would write a CoffeeScript for C++.
2 comments

I spent a nontrivial amount of time thinking about writing a CoffeeScript-like syntactic sugar layer over C, and I ended up abandoning the project for several reasons, not the least of which being that too many things make nice (or even different) syntax hard. What to do about macros, for example, bothered me for a long time.
C++ is a beast of a language that has semantics which are pretty much too big to keep in your head - I think the best potential for this is some of the new languages targeting some of the same ends (Rust is closer to the capabilities of C++, but Go is more mature and has better tooling).
Alas, "Go" was forced to look sorta like C, even though it really acts more like Modula with closures and garbage collection. (ignoring that C & Modula are both just redressed Algol)

Go is more of a C-like counter example of the things the author is talking about, with its authoritarian use of K&R curly brace formatting, and not making statements into expressions.

Right on. I would definitely constrain such a thing to a small subset of C++.