April 22, 2009 Re: Few mixed things | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Derek Parnell | Derek Parnell:
> Yes, this is the legacy we now must keep.
I am willing to modify the D2 code written by everyone before April 22 2009 to remove the /+ +/ and replace it with the /* */, once the latter are nestable :-) (Mostly it's Phobos2, I presume).
Bye,
bearophile
| |||
April 22, 2009 Re: Few mixed things | ||||
|---|---|---|---|---|
| ||||
Posted in reply to bearophile | bearophile wrote: > What is the advantage of having a separate /+ +/ nestable comment syntax? > Can't the /+ +/ be removed to make the normal /* */ syntax nestable? > (IS the different C semantics of /* */ a problem here? I don't think so.) Sometimes it's handy to have non-nesting comments. For example, when debugging something, I sometimes use: --- foo(); /* bar(); /* baz(); //*/ --- So I can quickly remove the first '/*' (by prepending '/') to uncomment bar() but not baz(). Also, Walter may feel differently about the C-compatibility thing than you do :). > The std.intrinsic module may gain a standard way to perform a 64-bit by 32-bit division, for the situations where you know the quotient will fit in 32 bits ('divl' instruction on X86). > CPUs that don't support such operation can use the normal 64-big division. That just sounds like a possible compiler optimization for --- ulong L; uint I; // initialize L & I auto result = cast(uint)(L / I); --- | |||
April 22, 2009 Re: Few mixed things | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Nick Sabalausky | Hello Nick, > "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 ... >> Yes, exactly my point. >>> 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. >> Precedent is a good reason to exist in /some given form/ if it is to exist at all. > 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. > So, ditto Nick on that one. | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply