C++ to catch up?

Paulo Pinto pjmlp at progtools.org
Mon Nov 5 04:10:35 PST 2012


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 at 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





More information about the Digitalmars-d mailing list