www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - C++ to catch up?

reply "jdrewsen" <nospam4321 hotmail.com> writes:
It seems like the C++ committee is speeding up development adding 
lots of the goodies from D like Ranges, static if, template 
contraints etc.

Will D still have a case when C++ gets this done?

I wonder if Andrei is part of the C++ Ranges Study Group?

The Future of C++:
http://channel9.msdn.com/Events/Build/2012/2-005

/Jonas
Nov 05 2012
next sibling parent reply Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Mon, 05 Nov 2012 11:00:27 +0100
"jdrewsen" <nospam4321 hotmail.com> wrote:

 It seems like the C++ committee is speeding up development adding 
 lots of the goodies from D like Ranges, static if, template 
 contraints etc.
 
 Will D still have a case when C++ gets this done?
 

Yes, even if they go and add all of D's features, D will still be much cleaner. (IMO)
Nov 05 2012
parent reply deadalnix <deadalnix gmail.com> writes:
Le 05/11/2012 11:22, Nick Sabalausky a écrit :
 On Mon, 05 Nov 2012 11:00:27 +0100
 "jdrewsen"<nospam4321 hotmail.com>  wrote:

 It seems like the C++ committee is speeding up development adding
 lots of the goodies from D like Ranges, static if, template
 contraints etc.

 Will D still have a case when C++ gets this done?

Yes, even if they go and add all of D's features, D will still be much cleaner. (IMO)

You never heard about property ?
Nov 05 2012
parent Timon Gehr <timon.gehr gmx.ch> writes:
On 11/05/2012 04:54 PM, deadalnix wrote:
 Le 05/11/2012 11:22, Nick Sabalausky a écrit :
 On Mon, 05 Nov 2012 11:00:27 +0100
 "jdrewsen"<nospam4321 hotmail.com>  wrote:

 It seems like the C++ committee is speeding up development adding
 lots of the goodies from D like Ranges, static if, template
 contraints etc.

 Will D still have a case when C++ gets this done?

Yes, even if they go and add all of D's features, D will still be much cleaner. (IMO)

You never heard about property ?

The enhanced C++ as specified by Nick will have it as well, so it is not too relevant here whether you consider it clean or not. :)
Nov 06 2012
prev sibling next sibling parent "monarch_dodra" <monarchdodra gmail.com> writes:
On Monday, 5 November 2012 at 10:22:02 UTC, Nick Sabalausky wrote:
 On Mon, 05 Nov 2012 11:00:27 +0100
 "jdrewsen" <nospam4321 hotmail.com> wrote:

 It seems like the C++ committee is speeding up development 
 adding lots of the goodies from D like Ranges, static if, 
 template contraints etc.
 
 Will D still have a case when C++ gets this done?
 

Yes, even if they go and add all of D's features, D will still be much cleaner. (IMO)

C++'s "range" is actually a wrapper over an iterator "first-last" pair. While it does bring the convenience of D's ranges to C++, it remains hobbled in terms of efficiency and implementation. C++'s paradigm is pointers and iterators. At best, you can sparkle some ranges over it, but you'll never shift the paradigm. -------- The thing with C++'s new feature is that it requires developers to be on the bleeding edge of C++ knowledge. It's fine for the enthusiasts that read programming journals on their week-ends (like you and I), but not for the standard developer. Not to mention, even then, the syntax is hard as hell: lambdas in for loops? I have to look up the syntax every time. automatic type inference of the return value of a function? "auto foo() -> declype(...)", what...? All these functionalities are great, but also out of reach. Most of my colleagues still struggle with "simple" design patters such as strategies, or just plain algorithms with functors. Everytime I say something like "awesome, C++ will allow type inference" or "yay, RValue references!" they look at me like I'm some kind of weird space alien... -------- D packages the whole thing in an easy to use but complete package. C++ just stacks complicated stuff on top of a hard to use core.
Nov 05 2012
prev sibling next sibling parent =?UTF-8?B?IkVyw6hiZSI=?= <erebe erebe.eu> writes:
On Monday, 5 November 2012 at 10:00:29 UTC, jdrewsen wrote:
 It seems like the C++ committee is speeding up development 
 adding lots of the goodies from D like Ranges, static if, 
 template contraints etc.

 Will D still have a case when C++ gets this done?

 I wonder if Andrei is part of the C++ Ranges Study Group?

 The Future of C++:
 http://channel9.msdn.com/Events/Build/2012/2-005

 /Jonas

http://forum.dlang.org/thread/iokgislnlzsvsosmqbbv forum.dlang.org
Nov 05 2012
prev sibling next sibling parent "Paulo Pinto" <pjmlp progtools.org> writes:
On Monday, 5 November 2012 at 11:06:39 UTC, monarch_dodra wrote:
 On Monday, 5 November 2012 at 10:22:02 UTC, Nick Sabalausky 
 wrote:
 On Mon, 05 Nov 2012 11:00:27 +0100
 "jdrewsen" <nospam4321 hotmail.com> wrote:

 It seems like the C++ committee is speeding up development 
 adding lots of the goodies from D like Ranges, static if, 
 template contraints etc.
 
 Will D still have a case when C++ gets this done?
 

Yes, even if they go and add all of D's features, D will still be much cleaner. (IMO)

C++'s "range" is actually a wrapper over an iterator "first-last" pair. While it does bring the convenience of D's ranges to C++, it remains hobbled in terms of efficiency and implementation. C++'s paradigm is pointers and iterators. At best, you can sparkle some ranges over it, but you'll never shift the paradigm. -------- The thing with C++'s new feature is that it requires developers to be on the bleeding edge of C++ knowledge. It's fine for the enthusiasts that read programming journals on their week-ends (like you and I), but not for the standard developer. Not to mention, even then, the syntax is hard as hell: lambdas in for loops? I have to look up the syntax every time. automatic type inference of the return value of a function? "auto foo() -> declype(...)", what...? All these functionalities are great, but also out of reach. Most of my colleagues still struggle with "simple" design patters such as strategies, or just plain algorithms with functors. Everytime I say something like "awesome, C++ will allow type inference" or "yay, RValue references!" they look at me like I'm some kind of weird space alien... -------- D packages the whole thing in an easy to use but complete package. C++ just stacks complicated stuff on top of a hard to use core.

I have the same feeling with some of our developers. Simpler languages tend to be manager friendly. It is always easier to find cheap resources. In my currently employer I have only done Java and C# projects so far, and I still fear the day I might do a C or C++ project, given the type of knowledge shown by some of our coworkers. -- Paulo
Nov 05 2012
prev sibling next sibling parent "jdrewsen" <nospam4321 hotmail.com> writes:
On Monday, 5 November 2012 at 11:39:54 UTC, Erèbe wrote:
 On Monday, 5 November 2012 at 10:00:29 UTC, jdrewsen wrote:
 It seems like the C++ committee is speeding up development 
 adding lots of the goodies from D like Ranges, static if, 
 template contraints etc.

 Will D still have a case when C++ gets this done?

 I wonder if Andrei is part of the C++ Ranges Study Group?

 The Future of C++:
 http://channel9.msdn.com/Events/Build/2012/2-005

 /Jonas

http://forum.dlang.org/thread/iokgislnlzsvsosmqbbv forum.dlang.org

I didn't read all of that thread because of the title "D vs C++11" - but it does list some very good arguments in favour of D. I'll stop the emergency port of my D project to C++ then :P /Jonas
Nov 05 2012
prev sibling next sibling parent "Adam D. Ruppe" <destructionator gmail.com> writes:
On Monday, 5 November 2012 at 10:00:29 UTC, jdrewsen wrote:
 Will D still have a case when C++ gets this done?

C++ does a pretty good job on a lot of things, but there's a bunch of little things that just make it a little more frustrating day to day than D. There's still a bunch of big differences too, but it is little conveniences and cleaner syntax, etc., that I don't think C++ will catch up on.
Nov 05 2012
prev sibling next sibling parent Tobias Pankrath <lists pankrath.net> writes:
On 11/05/2012 11:22 AM, Nick Sabalausky wrote:
 On Mon, 05 Nov 2012 11:00:27 +0100
 "jdrewsen" <nospam4321 hotmail.com> wrote:

 It seems like the C++ committee is speeding up development adding
 lots of the goodies from D like Ranges, static if, template
 contraints etc.

 Will D still have a case when C++ gets this done?

Yes, even if they go and add all of D's features, D will still be much cleaner. (IMO)

Compile times!
Nov 05 2012
prev sibling next sibling parent "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Mon, Nov 05, 2012 at 01:19:04PM +0100, jdrewsen wrote:
 On Monday, 5 November 2012 at 11:39:54 UTC, Erèbe wrote:
On Monday, 5 November 2012 at 10:00:29 UTC, jdrewsen wrote:
It seems like the C++ committee is speeding up development
adding lots of the goodies from D like Ranges, static if,
template contraints etc.

Will D still have a case when C++ gets this done?

I wonder if Andrei is part of the C++ Ranges Study Group?

The Future of C++:
http://channel9.msdn.com/Events/Build/2012/2-005

/Jonas

http://forum.dlang.org/thread/iokgislnlzsvsosmqbbv forum.dlang.org

I didn't read all of that thread because of the title "D vs C++11" - but it does list some very good arguments in favour of D. I'll stop the emergency port of my D project to C++ then :P

The thing you've to understand about C++ is that it is an old, widely-adopted language, and therefore it needs to maintain backward compatibility with the very large existing codebase. This prevents it from truly cleaning up some of the earliest design flaws, because that will break just about every C++ program ever written, which is something the C++ committee pretty much will never do. We're already seeing a little bit of this effect in D; introducing breaking changes OT1H lets us clean up the language and make it much better, but it also alienates a lot of existing users. That's why Walter has stated that there must be no more breaking changes, even if it is to fix what is in retrospect a poor language design decision. This limits how much we can do to fix existing design issues. D had the advantage that it could learn from C++'s mistakes and do things better. C++ doesn't have that benefit; it can introduce new features, but the old flaws that still plague the language must live on. The horribly ambiguous template syntax, for example, will continue to live on. C++ will continue being the language that must be parsed before it can be lexed. The ctor, copy ctor, etc., mess, must still live on. Operator overloading will never have the convenience of D's compile-time string-based approach, which allows very nice ways of reducing boilerplate code. Etc., etc.. And new features must work around existing syntax in order to not break existing code, which means nice syntax like D's templates, aliases, etc., will never be as nice as they are in D. I used to be big on C/C++ before I found D. From my admittedly biased POV, though, C++11 (and beyond) is "too little, too late". I remember being really excited when I first found out about C++11 (back when it was still called C++0x -- it didn't make it before the turn of the decade). Finally, I thought, here was the long-needed language update that everyone's been waiting for. Well, I have to say that I felt quite deflated after reading the spec summary. Yes it introduced some new innovations which I liked, and some fixes to the most glaring language flaws. But it was too little, too late. It took way too many years to finalize, which meant many more years before wide adoption and availability of conforming implementations. And it *still* didn't fix all of the fundamental flaws in the language. Not long afterwards, I found D, and that was the end of C++ for me. Yes D does have its warts, but in spite of it all it's still superior to C++ in many fundamental ways. T -- Guns don't kill people. Bullets do.
Nov 05 2012
prev sibling next sibling parent "Jonathan M Davis" <jmdavisProg gmx.com> writes:
On Monday, November 05, 2012 11:00:27 jdrewsen wrote:
 It seems like the C++ committee is speeding up development adding
 lots of the goodies from D like Ranges, static if, template
 contraints etc.
 
 Will D still have a case when C++ gets this done?
 
 I wonder if Andrei is part of the C++ Ranges Study Group?
 
 The Future of C++:
 http://channel9.msdn.com/Events/Build/2012/2-005

The closer that C++ gets to D, the less interested that many people will be in adopting it, particularly because of the large user base and the large amount of code out there that already uses C++. Programmers have to be convinced to move to D, and for many C++ programmers, the improvements to C++11 are enough to make a move to D not worth it, even if D is a better language. But C++ will never have all that D does. There are too many things that it would have to fundamentally change (e.g. how arrays work) which it can't change, because it would break backwards compatibility. Many of C++'s flaws stem from retaining backwards compatibility with C, and they're not going to break that now either. So, while they can do a lot to improve C++, there's a definite limit to it. D will ultimately have similar problems, since we'll have to maintain backwards compatibility for the same reasons that every other mainstream language does, but it's definitely ahead of C++ in that regard, because it was able to learn from C++'s mistakes. And if we ever create a D3, and we're willing to actually break compatibility with that version change (which C++ will never do in any real way with any version change), then we can avoid C++'s fate in that regard to at least some extent, but then you get into a situation like python 2 and python 3 or perl 5 and perl 6. In any case, it's pretty much a given that improving C++ will mean that fewer people will move away from it to other languages, but it's also a given that there are fundamental problems with C++ that can't be fixed, and in that regard, D will always come out ahead of it. - Jonathan M Davis
Nov 05 2012
prev sibling parent Marco Leise <Marco.Leise gmx.de> writes:
Am Mon, 05 Nov 2012 13:10:35 +0100
schrieb "Paulo Pinto" <pjmlp progtools.org>:

 On Monday, 5 November 2012 at 11:06:39 UTC, monarch_dodra wrote:
 On Monday, 5 November 2012 at 10:22:02 UTC, Nick Sabalausky 
 wrote:
 On Mon, 05 Nov 2012 11:00:27 +0100
 "jdrewsen" <nospam4321 hotmail.com> wrote:

 It seems like the C++ committee is speeding up development 
 adding lots of the goodies from D like Ranges, static if, 
 template contraints etc.
 
 Will D still have a case when C++ gets this done?
 

Yes, even if they go and add all of D's features, D will still be much cleaner. (IMO)

C++'s "range" is actually a wrapper over an iterator "first-last" pair. While it does bring the convenience of D's ranges to C++, it remains hobbled in terms of efficiency and implementation. C++'s paradigm is pointers and iterators. At best, you can sparkle some ranges over it, but you'll never shift the paradigm. -------- The thing with C++'s new feature is that it requires developers to be on the bleeding edge of C++ knowledge. It's fine for the enthusiasts that read programming journals on their week-ends (like you and I), but not for the standard developer. Not to mention, even then, the syntax is hard as hell: lambdas in for loops? I have to look up the syntax every time. automatic type inference of the return value of a function? "auto foo() -> declype(...)", what...? All these functionalities are great, but also out of reach. Most of my colleagues still struggle with "simple" design patters such as strategies, or just plain algorithms with functors. Everytime I say something like "awesome, C++ will allow type inference" or "yay, RValue references!" they look at me like I'm some kind of weird space alien... -------- D packages the whole thing in an easy to use but complete package. C++ just stacks complicated stuff on top of a hard to use core.

I have the same feeling with some of our developers. Simpler languages tend to be manager friendly. It is always easier to find cheap resources. In my currently employer I have only done Java and C# projects so far, and I still fear the day I might do a C or C++ project, given the type of knowledge shown by some of our coworkers. -- Paulo

Are you talking bad about your colleagues behind their backs ? Hey, if I was to write a project in Haskell I'd be the idiot, too. -- Marco
Nov 05 2012