March 10, 2017
On 03/10/2017 11:43 AM, Ola Fosheim Grøstad wrote:
> On Friday, 10 March 2017 at 19:15:49 UTC, Ali Çehreli wrote:
>> C++11 was a big step forward for C++ that closed the gap with D. At
>> the time, it felt to me like they copied everything from D but now I
>> know that programming language ideas are everywhere and it's hard to
>> pinpoint who borrowed what from whom.
>
> It is rather obvious that D2 leans heavily on pre-C++11... Not sure what
> C++11 would have borrowed from D though.

Browsing here:

  https://en.wikipedia.org/wiki/C%2B%2B11

- constexpr (a poor man's CTFE)
- Type inference
- Range-based for
- Lambdas
- Ability to call constructors from constructors
- (Not sure about D timeline here) Explicit overrides and final
- Null pointer constant
- Strongly typed enumerations
- Explicit conversion operators
- Template aliases
- Variadic templates
- ...

At this point it feels like copying almost the entire list so I stop. :)

Ali

March 10, 2017
On Friday, 10 March 2017 at 19:53:52 UTC, Ali Çehreli wrote:
> - constexpr (a poor man's CTFE)
> - Type inference
> - Range-based for
> - Lambdas

As far as I can tell C++11 was mostly an absorption of existing practices, largely syntactical in nature. Lambdas are only syntactical sugar over function objects (which  in turn is a weak version of Beta patterns, a language Bjarne most certainly knew of as he has complained about someone running off with his book on the language and the fact  that he shows a lot of respect for Kristen Nygaard). The for loop was pure syntactical sugar over STL iterators, on the level of a C-macro...

> - (Not sure about D timeline here) Explicit overrides and final

Beta has it.

> - Null pointer constant

Simula. Which C++ is a direct descendant of.

> At this point it feels like copying almost the entire list so I stop. :)

Well, the only big thing in C++11 was standardization of ownership mechanisms and getting more compact syntax for function objects (lambdas).

The C++ language semantics didn't change much IMO. The idioms has changed a lot though. Although it isn't as visible in the codebases on github yet...

March 10, 2017
On Friday, 10 March 2017 at 20:31:59 UTC, Ola Fosheim Grøstad wrote:
> On Friday, 10 March 2017 at 19:53:52 UTC, Ali Çehreli wrote:
>> - constexpr (a poor man's CTFE)
>> - Type inference
>> - Range-based for
>> - Lambdas
>
> As far as I can tell C++11 was mostly an absorption of existing practices, largely syntactical in nature. Lambdas are only syntactical sugar over function objects (which  in turn is a weak version of Beta patterns, a language Bjarne most certainly knew of as he has complained about someone running off with his book on the language and the fact  that he shows a lot of respect for Kristen Nygaard). The for loop was pure syntactical sugar over STL iterators, on the level of a C-macro...

IMHO... Only from a typical C++ centric perspective can it be claimed that C++11 and higher have not copied (not from D which was most of the time not first). The fact that these features are theorized outside of languages doesn't mean that the last language to implement them can claim the same originality as the first. And everything can be called "syntactic sugar" over assembly, nay machine code.
Even C# had lambdas, type inference, some constant folding etc etc years before C++

D has copied these from other languages/theories as well, but the language has been designed from the beginning to accommodate them. And yes often D has implemented them first, which can only be blamed on C++ itself. C++ was designed to be a superset of C including pre-processor, without any foresight, and the can has been kicked down the road since -- and each time it could be kicked only with the approval of an ISO committee.
March 11, 2017
On Friday, 10 March 2017 at 23:00:16 UTC, XavierAP wrote:
> IMHO... Only from a typical C++ centric perspective can it be claimed that C++11 and higher have not copied (not from D which was most of the time not first).

Neither C++ or D have any significant original features.

> the first. And everything can be called "syntactic sugar" over assembly, nay machine code.

This isn't right though. Modern C++ has added some semantic additions and adjustments to enable new patterns (or stricter typing).

> And yes often D has implemented them first, which can only be blamed on C++ itself. C++ was designed to be

Not sure what you mean. Features are proposed decades before they get standardized and gets implemented as experimental features as well, often years before. In general a standardization process expects multiple independent implementations to exist before acceptance...

> time it could be kicked only with the approval of an ISO committee.

Not really, there are multiple non standard features in all the C++ compilers and people use them. Each of those compilers are more widespread than D, so if you want a fair conparison you'd have to compare the dialects and not an ISO standard (which always will be a shared subset of the implementations)


March 11, 2017
On Friday, 10 March 2017 at 11:25:11 UTC, Traktor TOni wrote:
> I think the name is just misleading, the D developers should at least be honest with themselves.

look here:  https://en.wikipedia.org/wiki/C_(programming_language)#History

so, once upon a day there was _A_ssembler. then a language of the name "B" was created. later a successor language was created - called "C".

it happened that someone was not satisfied with "C", but didnt really want to abandon "C". thats why he created a superset of "C" and called it "C++".  a "C" with more capabilities.  (thats probably not 100% true, but still pretty much the meaning of the name).

another person was not satisfied and created another successor. "D" was born. "D" abandoned compatibility with "C" - more than "C++" did. also, "D" is ment to be a successor of C/C++. but "D" is not a (C++)++ or C+2, also not a C++, because its not a superset, since it breaks compatibility to the predecessors

in that context, i think the name is _not misleading_:  A B C C++ _D_
March 11, 2017
On Saturday, 11 March 2017 at 10:32:02 UTC, meppl wrote:
> On Friday, 10 March 2017 at 11:25:11 UTC, Traktor TOni wrote:
>> I think the name is just misleading, the D developers should at least be honest with themselves.
>
> look here:  https://en.wikipedia.org/wiki/C_(programming_language)#History
>
> so, once upon a day there was _A_ssembler. then a language of the name "B" was created. later a successor language was created - called "C".
>
> it happened that someone was not satisfied with "C", but didnt really want to abandon "C". thats why he created a superset of "C" and called it "C++".  a "C" with more capabilities.  (thats probably not 100% true, but still pretty much the meaning of the name).
>
> another person was not satisfied and created another successor. "D" was born. "D" abandoned compatibility with "C" - more than "C++" did. also, "D" is ment to be a successor of C/C++. but "D" is not a (C++)++ or C+2, also not a C++, because its not a superset, since it breaks compatibility to the predecessors
>
> in that context, i think the name is _not misleading_:  A B C C++ _D_

Yeah, we could say that D is an alias of ++C. i.e. the result of the increment. As C++ is the operation of incrementing but returning the old value. The day they will have achieved their incrementation they will realise that they now have reached where D is already ;-)

Don't take that too seriously, these dick wagging posts are generally not very productive and indeed can paint people in a unpleasant way.
March 11, 2017
D••
:D
March 31, 2017
On Saturday, 11 March 2017 at 15:27:50 UTC, Kagamin wrote:
> D••
> :D

thanks for sharing https://img.memesuper.com/9d0f96eb3d5a68cff0a3dd357957895b_muahaha-muahaha-meme_625-833.jpeg
March 31, 2017
On Friday, 31 March 2017 at 06:40:51 UTC, Ali wrote:
> On Saturday, 11 March 2017 at 15:27:50 UTC, Kagamin wrote:
>> D••
>> :D
>
> thanks for sharing https://img.memesuper.com/9d0f96eb3d5a68cff0a3dd357957895b_muahaha-muahaha-meme_625-833.jpeg

So if your first child is called, say, Ali, your second child will be called Ali++. :-) The Romans actually had that naming scheme: Primus, Secundus ...
1 2 3
Next ›   Last »