Hacker News new | ask | show | jobs
by humanrebar 3155 days ago
The best way to add new language primitives without breaking anyone is to pick a syntax that currently fails to compile.

`reflexpr interface {...}` could be declaring and initializing a global.

`$class`, on the other hand, doesn't compile. One could also do `virtual class` or something, I guess, since `virtual class` is a combination of reserved keywords.

1 comments

You are correct. But there is another side too. $ makes the language way uglier than it is now, and C++ is ugly language already.
Why does it make C++ more ugly? Do you find PHP ugly too?