April 21, 2009
Nick Sabalausky Wrote:

> "BCS" <ao@pathlink.com> wrote in message news:78ccfa2d3e7918cb909fe7a39778@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...


Paul
April 21, 2009
On Tue, Apr 21, 2009 at 2:24 PM, Paul D. Anderson <paul.d.removethis.anderson@comcast.andthis.net> wrote:
> Nick Sabalausky Wrote:
>
>> "BCS" <ao@pathlink.com> wrote in message news:78ccfa2d3e7918cb909fe7a39778@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
April 21, 2009
On Tue, 21 Apr 2009 13:45:44 -0400, Nick Sabalausky wrote:

> I can understand the desire not to cause too much trouble for porting, but sometimes I think D places far too much emphasis on that.

"sometimes" !?

-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell
April 21, 2009
On Tue, 21 Apr 2009 20:55:03 +0000 (UTC), BCS wrote:

> /**/ has well defined semantics,

 ... in the C programming language ...

> changing it will cause problems that replacing it will not.

The "well defined semantics" are not god-given axioms, or to rephrase it, because something is 'thus' in C does not mean that it must also be 'thus' in any other programming language.

For something to be in a programming language, it needs to be justified on its own terms rather than only using precedent as its rationale to exist.

-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell
April 21, 2009
"Bill Baxter" <wbaxter@gmail.com> wrote in message news:mailman.1179.1240349493.22690.digitalmars-d@puremagic.com...
> On Tue, Apr 21, 2009 at 2:24 PM, Paul D. Anderson <paul.d.removethis.anderson@comcast.andthis.net> wrote:
>> Nick Sabalausky Wrote:
>>
>>> "BCS" <ao@pathlink.com> wrote in message news:78ccfa2d3e7918cb909fe7a39778@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.


April 21, 2009
"Derek Parnell" <derek@psych.ward> wrote in message news:hn975kl8v6wa.bjme1g5z2jj3$.dlg@40tude.net...
> On Tue, 21 Apr 2009 20:55:03 +0000 (UTC), BCS wrote:
>
>> /**/ has well defined semantics,
>
> ... in the C programming language ...
>
>> changing it will cause problems that replacing it will not.
>
> The "well defined semantics" are not god-given axioms, or to rephrase it, because something is 'thus' in C does not mean that it must also be 'thus' in any other programming language.
>
> For something to be in a programming language, it needs to be justified on its own terms rather than only using precedent as its rationale to exist.
>

I agree with you on this, however I think what they meant was that (unless I'm mistaken) /**/ also behaves the same way in every other language that actually uses /**/ for comments.


April 21, 2009
"Derek Parnell" <derek@psych.ward> wrote in message news:1w5qr20r0ro12.n5x2lan1yen4.dlg@40tude.net...
> On Tue, 21 Apr 2009 13:45:44 -0400, Nick Sabalausky wrote:
>
>> I can understand the desire not to cause too much trouble for porting,
>> but
>> sometimes I think D places far too much emphasis on that.
>
> "sometimes" !?
>

Well, I'm not always thinking about D! Sometimes I'm thinking about Stargate ;)


April 21, 2009
On Tue, Apr 21, 2009 at 3:50 PM, Nick Sabalausky <a@a.a> wrote:
> "Bill Baxter" <wbaxter@gmail.com> wrote in message news:mailman.1179.1240349493.22690.digitalmars-d@puremagic.com...
>> On Tue, Apr 21, 2009 at 2:24 PM, Paul D. Anderson <paul.d.removethis.anderson@comcast.andthis.net> wrote:
>>> Nick Sabalausky Wrote:
>>>
>>>> "BCS" <ao@pathlink.com> wrote in message news:78ccfa2d3e7918cb909fe7a39778@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.

I agree that if Walter had chosen to just make /* */ nestable
originally it would have been a fine choice.
But now that D has had /+ +/ for ten years or so, I don't see much
point in changing it.  It will only break everyone's code for what is
a miniscule benefit at best, and a miniscule detriment at worst,
depending on who you ask.

--bb
April 21, 2009
On Tue, 21 Apr 2009 16:18:34 -0700, Bill Baxter wrote:


> I agree that if Walter had chosen to just make /* */ nestable
> originally it would have been a fine choice.
> But now that D has had /+ +/ for ten years or so, I don't see much
> point in changing it.  It will only break everyone's code for what is
> a miniscule benefit at best, and a miniscule detriment at worst,
> depending on who you ask.

Yes, this is the legacy we now must keep.

-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell
April 22, 2009
On Tue, 21 Apr 2009 18:52:48 -0400, Nick Sabalausky wrote:

> I think what they meant was that (unless I'm mistaken) /**/ also behaves the same way in every other language that actually uses /**/ for comments.

However, I regularly use the Progress language in which /* */ are nestable. I know that it is a rather obscure language but it does indicate that /* */ can be nested successfully.

-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell