Few mixed things

Nick Sabalausky a at a.a
Tue Apr 21 15:50:55 PDT 2009


"Bill Baxter" <wbaxter at gmail.com> wrote in message 
news:mailman.1179.1240349493.22690.digitalmars-d at puremagic.com...
> On Tue, Apr 21, 2009 at 2:24 PM, Paul D. Anderson
> <paul.d.removethis.anderson at comcast.andthis.net> wrote:
>> Nick Sabalausky Wrote:
>>
>>> "BCS" <ao at pathlink.com> wrote in message
>>> news:78ccfa2d3e7918cb909fe7a39778 at news.digitalmars.com...
>>> > Reply to Denis,
>>> >
>>> >>> I'd be fine depricating /**/.
>>> >>>
>>> >> You mean, deprecating /++/?
>>> >>
>>> >
>>> > No, I mean exactly what I said.
>>> > /**/ has well defined semantics, changing it will cause problems that
>>> > replacing it will not.
>>> >
>>>
>>> Are there any problems you see with it other than porting code to D? 
>>> (FWIW,
>>> I've never come across any code that had a /* in between a /* and */.)
>>>
>>>
>>
>> I've seen lots of code that did that.
>>
>> Now, if you mean code that intentionally did that...
>
> I could see (and maybe have seen?) people using it in comments:
>
> /******/
> /*  big
> /*  long
> /*  comment
> /*  box
> /*******/
>
> --bb

Yea, but something like that would be trivial to notice and fix.

And come to think of it, even if it was commented-code instead of a doc 
block:

regular code
/*
commented code
/*
more commented code
*/
regular code that becomes accidentially commented

That would still be easily detectable because, assuming the original code 
was compiling in the original language (which would almost certainly be the 
case if you're actually bothering to port it), then there wouldn't be enough 
matching '*/'s and the rest of the file would be commented out. And that's 
something that I really can't imagine would ever cause a 
successfully-compiling logic error. What you'd get, if not a "block comment 
never closed" error, would be an error from a {}, (), or [] never being 
closed, or a symbol not defined error. If none of those errors occurr, then 
whatever had been accidentially-commented would have already been dead code 
to begin with.





More information about the Digitalmars-d mailing list