www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Ruby 3.0 to have immutable strings by default / C++ heading towards

reply "John Carter" <john.carter taitradio.com> writes:
https://twitter.com/yukihiro_matz/status/634386185507311616

Yet another choice D got right "out of the box" :-)

Even Bjarne is coming around to the "Generic all the time" view...

    https://www.youtube.com/watch?v=xcpSLRpOMJM

Pity that concepts looks to be a very painful syntax for 
expressing what D does so clearly.

Hurry up Walter, the rest of the world is catching up to you! :-D

(Just joking... things like this clearly show you're leading, and 
leading in the right direction!)
Aug 20 2015
next sibling parent "rsw0x" <anonymous anonymous.com> writes:
On Thursday, 20 August 2015 at 22:07:10 UTC, John Carter wrote:
 Pity that concepts looks to be a very painful syntax for 
 expressing what D does so clearly.
I believe this is the main reason people use D.
Aug 20 2015
prev sibling next sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 8/20/2015 3:07 PM, John Carter wrote:
 https://twitter.com/yukihiro_matz/status/634386185507311616

 Yet another choice D got right "out of the box" :-)

 Even Bjarne is coming around to the "Generic all the time" view...

     https://www.youtube.com/watch?v=xcpSLRpOMJM

 Pity that concepts looks to be a very painful syntax for expressing what D does
 so clearly.

 Hurry up Walter, the rest of the world is catching up to you! :-D

 (Just joking... things like this clearly show you're leading, and leading in
the
 right direction!)
I posted in another thread a while back a list of D features that C++ is rushing to incorporate.
Aug 20 2015
next sibling parent reply "rsw0x" <anonymous anonymous.com> writes:
On Thursday, 20 August 2015 at 22:22:26 UTC, Walter Bright wrote:
 On 8/20/2015 3:07 PM, John Carter wrote:
 https://twitter.com/yukihiro_matz/status/634386185507311616

 Yet another choice D got right "out of the box" :-)

 Even Bjarne is coming around to the "Generic all the time" 
 view...

     https://www.youtube.com/watch?v=xcpSLRpOMJM

 Pity that concepts looks to be a very painful syntax for 
 expressing what D does
 so clearly.

 Hurry up Walter, the rest of the world is catching up to you! 
 :-D

 (Just joking... things like this clearly show you're leading, 
 and leading in the
 right direction!)
I posted in another thread a while back a list of D features that C++ is rushing to incorporate.
The problem is that they're incorporating them poorly and ugly. I was watching the video with Bjarne and he brought up the point of how much compiler time is increased by these features. It's something I take for granted in D, I suppose.
Aug 20 2015
parent reply "H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> writes:
On Thu, Aug 20, 2015 at 10:34:08PM +0000, rsw0x via Digitalmars-d wrote:
 On Thursday, 20 August 2015 at 22:22:26 UTC, Walter Bright wrote:
On 8/20/2015 3:07 PM, John Carter wrote:
https://twitter.com/yukihiro_matz/status/634386185507311616

Yet another choice D got right "out of the box" :-)

Even Bjarne is coming around to the "Generic all the time" view...

    https://www.youtube.com/watch?v=xcpSLRpOMJM

Pity that concepts looks to be a very painful syntax for expressing
what D does so clearly.

Hurry up Walter, the rest of the world is catching up to you! :-D

(Just joking... things like this clearly show you're leading, and
leading in the right direction!)
I posted in another thread a while back a list of D features that C++ is rushing to incorporate.
The problem is that they're incorporating them poorly and ugly.
[...] Is it really a *problem*, though? ;-) Having C++ play catchup with D, poorly, is good motivation for people to finally give up C++ and adopt D. T -- Ruby is essentially Perl minus Wall.
Aug 20 2015
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 8/20/2015 3:35 PM, H. S. Teoh via Digitalmars-d wrote:
 I posted in another thread a while back a list of D features that C++
 is rushing to incorporate.
The problem is that they're incorporating them poorly and ugly.
[...] Is it really a *problem*, though? ;-) Having C++ play catchup with D, poorly, is good motivation for people to finally give up C++ and adopt D.
It's a nice validation of the great work we're doing with D.
Aug 20 2015
parent reply Rikki Cattermole <alphaglosined gmail.com> writes:
On 8/21/2015 11:58 AM, Walter Bright wrote:
 On 8/20/2015 3:35 PM, H. S. Teoh via Digitalmars-d wrote:
 I posted in another thread a while back a list of D features that C++
 is rushing to incorporate.
The problem is that they're incorporating them poorly and ugly.
[...] Is it really a *problem*, though? ;-) Having C++ play catchup with D, poorly, is good motivation for people to finally give up C++ and adopt D.
It's a nice validation of the great work we're doing with D.
And that we are doing it properly, first time. Props to you Walter for being the no-man!
Aug 20 2015
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 8/20/2015 7:50 PM, Rikki Cattermole wrote:
 And that we are doing it properly, first time. Props to you Walter for being
the
 no-man!
We've still made many mistakes. But C++ is a lot more trapped by the past than D is - such as the random size of 'int', the macro preprocessor, syntax, useless const, non-Unicode character sets, declaration ordering, friend declarations, Koenig lookup, etc. At least C++ finally let go of trigraphs, ugh. I'm still amazed by how even modern C++ code bases embed the trickiest, most bizarre uses of the preprocessor and then build their entire code structure around it.
Aug 20 2015
next sibling parent Rikki Cattermole <alphaglosined gmail.com> writes:
On 8/21/2015 5:43 PM, Walter Bright wrote:
 On 8/20/2015 7:50 PM, Rikki Cattermole wrote:
 And that we are doing it properly, first time. Props to you Walter for
 being the
 no-man!
We've still made many mistakes. But C++ is a lot more trapped by the past than D is - such as the random size of 'int', the macro preprocessor, syntax, useless const, non-Unicode character sets, declaration ordering, friend declarations, Koenig lookup, etc. At least C++ finally let go of trigraphs, ugh. I'm still amazed by how even modern C++ code bases embed the trickiest, most bizarre uses of the preprocessor and then build their entire code structure around it.
Yeah I know we have. But unlike C++ with D2 we kinda solidified the idea of serious breaking changes every 5-10 years. Which is kinda important. They don't do this.
Aug 20 2015
prev sibling parent reply Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On 08/21/2015 01:43 AM, Walter Bright wrote:
 I'm still amazed by how even modern C++ code bases embed the trickiest,
 most bizarre uses of the preprocessor and then build their entire code
 structure around it.
I probably haven't seen all the stuff you have, but I find that's the only way to tolerate working in C++: Macro the crap out of it :)
Aug 21 2015
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 8/21/2015 7:24 AM, Nick Sabalausky wrote:
 I probably haven't seen all the stuff you have,
I'd be ashamed of such code if I'd written it, and if I was a C++ program manager I wouldn't allow such in the code base. I don't understand why the C++ committee, in its quest to improve the language, has not pushed forward with proper replacements for typical preprocessor uses, with the intent of eventually deprecating it entirely.
 but I find that's the only way
 to tolerate working in C++: Macro the crap out of it :)
I try to practice what I preach, and the C++ code base for dmd has been gradually getting rid of its use of the preprocessor (even though it's pretty tame use as these things go).
Aug 21 2015
parent reply Jacob Carlborg <doob me.com> writes:
On 2015-08-21 23:55, Walter Bright wrote:
 I don't understand why the C++ committee, in its quest to improve the
 language, has not pushed forward with proper replacements for typical
 preprocessor uses, with the intent of eventually deprecating it entirely.
With modules being already implemented in Clang, is there a legitimate use case for the preprocessor left? -- /Jacob Carlborg
Aug 23 2015
next sibling parent Dmitry Olshansky <dmitry.olsh gmail.com> writes:
On 24-Aug-2015 09:17, Jacob Carlborg wrote:
 On 2015-08-21 23:55, Walter Bright wrote:
 I don't understand why the C++ committee, in its quest to improve the
 language, has not pushed forward with proper replacements for typical
 preprocessor uses, with the intent of eventually deprecating it entirely.
With modules being already implemented in Clang, is there a legitimate use case for the preprocessor left?
Code generation and crude meta-programming. -- Dmitry Olshansky
Aug 23 2015
prev sibling next sibling parent reply "rsw0x" <anonymous anonymous.com> writes:
On Monday, 24 August 2015 at 06:17:06 UTC, Jacob Carlborg wrote:
 On 2015-08-21 23:55, Walter Bright wrote:
 I don't understand why the C++ committee, in its quest to 
 improve the
 language, has not pushed forward with proper replacements for 
 typical
 preprocessor uses, with the intent of eventually deprecating 
 it entirely.
With modules being already implemented in Clang, is there a legitimate use case for the preprocessor left?
implement this in D https://github.com/solodon4/Mach7
Aug 23 2015
parent Jacob Carlborg <doob me.com> writes:
On 2015-08-24 08:35, rsw0x wrote:

 implement this in D
 https://github.com/solodon4/Mach7
It's just a matter of syntax. -- /Jacob Carlborg
Aug 23 2015
prev sibling parent reply "Jonathan M Davis" <jmdavisProg gmx.com> writes:
On Monday, 24 August 2015 at 06:17:06 UTC, Jacob Carlborg wrote:
 On 2015-08-21 23:55, Walter Bright wrote:
 I don't understand why the C++ committee, in its quest to 
 improve the
 language, has not pushed forward with proper replacements for 
 typical
 preprocessor uses, with the intent of eventually deprecating 
 it entirely.
With modules being already implemented in Clang, is there a legitimate use case for the preprocessor left?
I use it all the time for handling log messages and throwing exceptions. Without that, you can't get stuff like the current file and line number, because C++ isn't smart enough to use the call point for __FILE__ and __LINE__. So, you either use macros so that the code _is_ at the call point, or you have to do it manually, and no one is going to do that sort of thing manually. I'm sure that there are other use cases, but those are the ones that I use all the time. Also, in my experience, getting static or global variables to work with dlls when you need them is hell, so it pretty much inevitably comes down to either using a macro or making it a function with a static variable inside it which it returns. I usually go with the useless function, but the macro sure seems tempting sometimes. To really replace macros - especially in a language that's already using them - you pretty much have to replace every use case for them, and I really don't see that happening to C++. Also, getting rid of macros would break C compatibility, which they won't do. Even if they add better alternatives to the language and recommend that you use those instead, they'll still support macros because of C. - Jonathan M Davis
Aug 23 2015
parent Walter Bright <newshound2 digitalmars.com> writes:
On 8/23/2015 11:40 PM, Jonathan M Davis wrote:
 To really replace macros - especially in a language that's already using them -
 you pretty much have to replace every use case for them, and I really don't see
 that happening to C++. Also, getting rid of macros would break C compatibility,
 which they won't do. Even if they add better alternatives to the language and
 recommend that you use those instead, they'll still support macros because of
C.
C++ continues to support old, bad practices while relentlessly advocating other techniques as best practices. So far, I have not seen that w.r.t. the preprocessor.
Aug 23 2015
prev sibling parent reply "Kagamin" <spam here.lot> writes:
On Thursday, 20 August 2015 at 22:22:26 UTC, Walter Bright wrote:
 I posted in another thread a while back a list of D features 
 that C++ is rushing to incorporate.
Just found the proposal for transitive const: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4388.html
Aug 21 2015
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 8/21/2015 2:26 AM, Kagamin wrote:
 On Thursday, 20 August 2015 at 22:22:26 UTC, Walter Bright wrote:
 I posted in another thread a while back a list of D features that C++ is
 rushing to incorporate.
Just found the proposal for transitive const: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4388.html
Note this gem: "Renamed class from logical_const to propagate_const as the former is used with different meaning in the D community." This oblique reference indicates that this idea is taken from D, and again confirms that D is the future of C++.
Aug 21 2015
parent "Kagamin" <spam here.lot> writes:
On Friday, 21 August 2015 at 22:03:51 UTC, Walter Bright wrote:
 "Renamed class from logical_const to propagate_const as the 
 former is used with different meaning in the D community."
I think, it was a concern raised by a reviewer for N3973 that the term has prior usage.
Aug 25 2015
prev sibling next sibling parent "Enamex" <enamex+d outlook.com> writes:
On Thursday, 20 August 2015 at 22:07:10 UTC, John Carter wrote:
 https://twitter.com/yukihiro_matz/status/634386185507311616

 Pity that concepts looks to be a very painful syntax for 
 expressing what D does so clearly.
One big difference is that C++1z concepts are supposed to allow looking for external functions, not only methods. That would require some kind of principled hijacking of templates in Dlang (or else the constraint template would keep looking for the functions, called by ufcs, either inside the type of in the templates declaration position). I haven't managed to work that out yet except by using mixins :/
Aug 24 2015
prev sibling parent "Chris" <wendlec tcd.ie> writes:
On Thursday, 20 August 2015 at 22:07:10 UTC, John Carter wrote:
 https://twitter.com/yukihiro_matz/status/634386185507311616

 Yet another choice D got right "out of the box" :-)

 Even Bjarne is coming around to the "Generic all the time" 
 view...

    https://www.youtube.com/watch?v=xcpSLRpOMJM

 Pity that concepts looks to be a very painful syntax for 
 expressing what D does so clearly.

 Hurry up Walter, the rest of the world is catching up to you! 
 :-D

 (Just joking... things like this clearly show you're leading, 
 and leading in the right direction!)
Imitation is the sincerest form of flattery - as they say.
Aug 25 2015