Thread overview | |||||
---|---|---|---|---|---|
|
March 04, 2006 Nested /* */ comments | ||||
---|---|---|---|---|
| ||||
Ok, this might be the most simple feature request ever, but here goes.
Why is it that the /* */ comments are not already nestable? Can it be done? It wouldn't even hurt C code porting, and might render /+ +/ useless, (or keep both comments so that /* */ and /+ +/ can be used for different types of commenting)
--
Bruno Medeiros - CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
|
March 04, 2006 Re: Nested /* */ comments | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bruno Medeiros | Bruno Medeiros wrote:
> Why is it that the /* */ comments are not already nestable? Can it be done? It wouldn't even hurt C code porting
It can be done, but it would hurt porting, which is probably why it's not been done. It's not that rare to see multiple "/*" relying on one "*/" to close them all. Were they made nesting, only the last would be closed and the code would break.
|
March 05, 2006 Re: Nested /* */ comments | ||||
---|---|---|---|---|
| ||||
Posted in reply to Deewiant | Deewiant wrote: > Bruno Medeiros wrote: >> Why is it that the /* */ comments are not already nestable? Can it be >> done? It wouldn't even hurt C code porting > > It can be done, but it would hurt porting, which is probably why it's not been > done. It's not that rare to see multiple "/*" relying on one "*/" to close them > all. Were they made nesting, only the last would be closed and the code would break. Hum, that's right, didn't remember about that case, although it seems like a bad practice to do that in C/C++ code. I still prefer that /* */ were nestable. -- Bruno Medeiros - CS/E student http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D |
Copyright © 1999-2021 by the D Language Foundation