Few mixed things

bearophile bearophileHUGS at lycos.com
Tue Apr 21 09:56:26 PDT 2009


BCS:
> you spotted the issue, code porting and principle of least surprise<

- Code porting: If you port C code to D, it uses /* */ in a non nested way, so making /* */ nestable in D doesn't cause problems. The new semantic is backward compatible.
- The principle of least surprise: a C programmer doesn't nest them. So if used correctly there's no surprise. If he/she/shi tries to nest them (creating a bug if it's C code) finds their increased semantic meaning. I don't think this can lead to bugs. The new nesting semantic is natural, and quick to learn once you read about it, see it, or try it once. My editor colorizes the code correctly according to the nestable /+ +/ too.
- Complexity: every syntactic bit removed from the D language is a gain. Less things to learn, to read about, to remember, etc.

So I'm for the removal of /+ +/ and making /* */ nestable.

Bye,
bearophile



More information about the Digitalmars-d mailing list