View mode: basic / threaded / horizontal-split · Log in · Help
November 05, 2012
Re: C++ to catch up?
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, 2012
Re: C++ to catch up?
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
November 06, 2012
Re: C++ to catch up?
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. :)
February 01
Re: C++ to catch up?
On Monday, 5 November 2012 at 18:20:23 UTC, Jonathan M Davis 
wrote:

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

(He goes on to point out that nonetheless D will always have the 
edge because legacy and installed base).

One should be careful about superficial translation of instances 
from the purely commercial world to the world of languages, but 
it strikes me that Clayton Christensen's Innovator's Dilemma does 
apply somewhat to the case of D vs its peer languages.  His 
central point is that in the beginning disruptive innovation very 
often tends to commence as a niche thing that may well be 
globally inferior - he uses the example of Honda motorbikes that 
allowed them to gain a foothold, and that once they dominated 
this niche and gained succour from it were able to use to expand 
their footprint to the extent that they posed a serious threat to 
the established dominant players.  But for many years, these (and 
later the cars) were seen as products of clearly inferior quality 
that had the advantage of being cheap.

The interesting thing is the emotional aspect of perception - 
nobody would have taken you seriously had you predicted in the 
early stages that Japanese auto makers would become what they 
subsequently became.  And one could have pointed out some decades 
after the war ended that they had been in the business for years, 
and why should anything change.  This is exactly what people say 
about D - it's been around forever and hasn't taken off, so why 
bother.  (see recent Slashdot thread for an example of this).

It is a basic insight of gestalt psychology that perception is 
shaped by emotion (really it's affect, which goes much deeper - 
emotion is the tip of the affect iceberg), and one way to know 
when this is occurring (my background is as an investor and 
speculator, so I have devoted a couple of decades to applying 
this in a practical way) is that on the one hand you have an 
emotional intensity out of proportion to the importance of the 
topic, and on the other the reasons people put forward to justify 
how they feel are observably not in accordance with the facts.  
See the Slashdot thread...

So in any case, D is not competing on price, but has other 
strengths that are of very high appeal to a certain group (if you 
want to write native code in a productive way) even though one 
must honestly acknowledge its imperfections in a global sense - 
reading back through the forums a dozen years, this seems to 
occur quite regularly in waves.  "When is D going to be 
finished?" even a decade back.  To be upset by the imperfections 
is missing the point, because languages - even programming 
languages - have a certain innate pattern of development (that 
resembles Goethe's observations about the metamorphosis of 
plants) that can't be forced, no matter how much one grumbles or 
stamps one's feet.

Furthermore, people tend to extrapolate superficial trends even 
though history tells us this is a poor guide to the future.  
Japanese cars really took off once crude exploded in the early 
70s (and again towards the end), and auto-makers were slow to 
respond.  Perhaps they did not organize their business on the 
basis of a prediction abuot energy prices, but the point is they 
were ready to take advantage of this shift when it occurred.

I do not want to attempt to be a pundit, but it is interesting 
that the notable use cases of D - at Sociomantic, Adroll, and 
Facebook are all aligned with certain salient and very powerful 
underlying technological drivers and trends.  It's no longer true 
in many applications that programmer time is expensive compared 
to machine time, and large data sets encountering the challenges 
of memory vs CPU trajectories create new challenges and require 
new approaches.  And it is a positive for D that some of its 
competition does not take D seriously at this stage - one thinks 
for example of Guido and his insistence that execution speed 
ought not to be a factor given work is I/O + network bound, even 
though this is less true for numerical computing and some kinds 
of data crunching.  (Not that D is mature here, but there is much 
that can be done within the existing framework).

In any case, dissatisfaction channeled in a constructive 
direction is a positive thing, because it is the opposite of 
complacency and is the edge of the challenger.  The point isn't 
how people feel, but how they respond to the challenges in front 
of them.

As a newcomer, it is very satisfying to see the progress made on 
documentation, ecosystem, and C++ integration and I have quite 
some respect for the difficulty of the roles of Walter and 
Andrei.  One is so short of time and attention, and no matter how 
hard one works and, whatever decisions one makes, it is 
impossible to keep everyone happy.  If one isn't being 
criticized, one isn't doing it right.  (Which is not to say that 
some of the criticisms will not have merit).

Here is a table from an article exploring Christensen's ideas.  
There are some resonances with past and current questions in the 
development of D, although as I said one can't map things 
perfectly because it's a different situation.  And the original 
book is better than what has been written based upon it.

[Table doesn't format well, but you can see it here.  The 
surrounding text is less relevant].
http://recode.net/2014/01/06/the-four-stages-of-disruption-2/



Laeeth.
February 02
Re: C++ to catch up?
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

Fast compile time, bearable syntax, thread safety arc so on...

C++ is building on faulty foundation. I see them talking example 
from us as a good news.
February 02
Re: C++ to catch up?
Thanks for the good read!

BTW, one effect D has had is that other languages are adopting D's features, 
though few will admit it.
February 02
Re: C++ to catch up?
On 2/1/15 4:35 PM, deadalnix 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
>
> Fast compile time, bearable syntax, thread safety arc so on...
>
> C++ is building on faulty foundation. I see them talking example from us
> as a good news.

Wait, is this a reply today to a post made in November 2012? -- Andrei
February 02
Re: C++ to catch up?
On Sunday, 1 February 2015 at 23:20:15 UTC, Laeeth Isharc wrote:
> [Table doesn't format well, but you can see it here.  The 
> surrounding text is less relevant].
> http://recode.net/2014/01/06/the-four-stages-of-disruption-2/

Heh, funny that that article was written by Sinofsky, who 
manifestly failed with his re-imagining of Windows with Win8, 
which is why he was soon given the boot.  Although, Win7 shipped 
under his watch and it's the first Windows that I could bear to 
use, actually a decent OS.
February 02
Re: C++ to catch up?
On 2/1/15 7:51 PM, Andrei Alexandrescu wrote:
> On 2/1/15 4:35 PM, deadalnix 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
>>
>> Fast compile time, bearable syntax, thread safety arc so on...
>>
>> C++ is building on faulty foundation. I see them talking example from us
>> as a good news.
>
> Wait, is this a reply today to a post made in November 2012? -- Andrei
>

Yes, here is what happens:

1. person does a search, finds 2+ year old thread that he likes to 
respond to.
2. Entire thread gets pushed to the "most recent" posts on forum/newsgroup
3. Others now see the thread (possibly for the second time), and don't 
realize it's old, and read it thinking it's about today.

A nice thing might be to make color of posts on forum.dlang.org based on 
recentness, 2+ month old be one color, 1+ year be another.

This wouldn't help with newsgroup users, but it probably would help with 
forum users.

-Steve
February 02
Re: C++ to catch up?
On Monday, 2 February 2015 at 00:49:14 UTC, Walter Bright wrote:
> Thanks for the good read!
>
> BTW, one effect D has had is that other languages are adopting 
> D's features, though few will admit it.

But those who know are very grateful to D for that.

OTOH, it would be a pity if D remains just a good proof of 
concept...
1 2 3 4
Top | Discussion index | About this forum | D home