November 05, 2012Re: C++ to catch up?
Posted in reply to jdrewsen
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
November 06, 2012Re: C++ to catch up?
Posted in reply to Paulo Pinto
Am Mon, 05 Nov 2012 13:10:35 +0100 schrieb "Paulo Pinto" <email@example.com>: > 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" <firstname.lastname@example.org> 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
November 06, 2012Re: C++ to catch up?
Posted in reply to deadalnix
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"<email@example.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. :)