View mode: basic / threaded / horizontal-split · Log in · Help
October 31, 2012
A little Py Vs C++
Maybe this Reddit thread should be completed with a nice D 
version :-)

http://www.reddit.com/r/programming/comments/12ecq5/c11_and_boost_succinct_like_python/

The thread contains some sad comments:

http://www.reddit.com/r/programming/comments/12ecq5/c11_and_boost_succinct_like_python/c6uihbi

http://www.reddit.com/r/programming/comments/12ecq5/c11_and_boost_succinct_like_python/c6ugw8h

Bye,
bearophile
November 01, 2012
Re: A little Py Vs C++
On Wednesday, 31 October 2012 at 23:04:15 UTC, bearophile wrote:
>
> The thread contains some sad comments:

It's unfortunate that there's still bad press circulating about a 
situation that is long gone. I suppose you just have to try and 
ignore those people.

A more interesting comment is this one:

"But the real problem here is that in order to achieve even that, 
the complexity and amount of concepts you have to deal with in 
C++11 is mind boggling."

The same is true in D. Well-written D code often does look rather 
elegant, but the amount of understanding needed to write 
beautiful D code is staggering.
November 01, 2012
Re: A little Py Vs C++
On Thursday, 1 November 2012 at 18:06:21 UTC, Peter Alexander 
wrote:
> On Wednesday, 31 October 2012 at 23:04:15 UTC, bearophile wrote:
>>
>> The thread contains some sad comments:
>
> It's unfortunate that there's still bad press circulating about 
> a situation that is long gone. I suppose you just have to try 
> and ignore those people.
>
> A more interesting comment is this one:
>
> "But the real problem here is that in order to achieve even 
> that, the complexity and amount of concepts you have to deal 
> with in C++11 is mind boggling."
>
> The same is true in D. Well-written D code often does look 
> rather elegant, but the amount of understanding needed to write 
> beautiful D code is staggering.

I have to agree having to deal with lots of concepts.

On the other hand, except for the programming drones, most D 
concepts are also available in most mainstream languages.

--
Paulo
November 01, 2012
Re: A little Py Vs C++
On 11/1/2012 12:19 PM, Paulo Pinto wrote:> On the other hand, except for the 
programming drones, most D concepts are also
> available in most mainstream languages.

Most of them are also well established in one form or another, with proven value.
November 01, 2012
Re: A little Py Vs C++
On Thu, Nov 01, 2012 at 08:19:56PM +0100, Paulo Pinto wrote:
> On Thursday, 1 November 2012 at 18:06:21 UTC, Peter Alexander wrote:
[...]
> >A more interesting comment is this one:
> >
> >"But the real problem here is that in order to achieve even that,
> >the complexity and amount of concepts you have to deal with in
> >C++11 is mind boggling."
> >
> >The same is true in D. Well-written D code often does look rather
> >elegant, but the amount of understanding needed to write beautiful
> >D code is staggering.
> 
> I have to agree having to deal with lots of concepts.

I don't see it as a problem, unless one is a programmer of the drone
persuasion. Many of D's concepts are liberatingly powerful, and very
potent in combination.


> On the other hand, except for the programming drones, most D
> concepts are also available in most mainstream languages.
[...]

If we want to minimize the number of concepts, we should program using
Lambda calculus. ;-) We already have lambda-syntax for delegates, after
all. Now just restrict all statements to only lambda expressions, get
rid of difficult concepts like arithmetic operators, variables and
imperative programming, and we have a winner on our hands.

Seriously, though, imagining that one can program effectively without
learning new concepts is a preposterous proposition to me. I just don't
understand the unwillingness to learn.


T

-- 
Computers shouldn't beep through the keyhole.
November 01, 2012
Re: A little Py Vs C++
On Thursday, 1 November 2012 at 18:06:21 UTC, Peter Alexander 
wrote:
>
> The same is true in D. Well-written D code often does look 
> rather elegant, but the amount of understanding needed to write 
> beautiful D code is staggering.

I'll second that!

I'm finally making good progress with D after a whole lot of 
effort, and there were (and still are) periods where I felt like 
giving up, although not so much anymore.

The number one missing item that I would love to get my hands on 
is comprehensive documentaion. What we have now leaves out far 
too much detail, and may be missing entire features, and what is 
available is scattered all over the place.

Reading the TDPL book is a huge help for understanding D, it's 
essential reading for sure, but it's only an overview rather than 
a full text on the subject. The TDPL lacks many of the fine 
details that one needs to know in order to write proper D code. I 
find myself experimenting a lot in order to figure out what the 
various obscure details are, but without comprehensive 
documentation, I cannot be certain if the observed behaviours are 
actually correct or fully complete under all situations.

--rt
November 01, 2012
Re: A little Py Vs C++
On Thu, Nov 01, 2012 at 08:49:40PM +0100, Rob T wrote:
> On Thursday, 1 November 2012 at 18:06:21 UTC, Peter Alexander wrote:
> >
> >The same is true in D. Well-written D code often does look rather
> >elegant, but the amount of understanding needed to write beautiful
> >D code is staggering.
> 
> I'll second that!
> 
> I'm finally making good progress with D after a whole lot of effort,
> and there were (and still are) periods where I felt like giving up,
> although not so much anymore.
> 
> The number one missing item that I would love to get my hands on is
> comprehensive documentaion. What we have now leaves out far too much
> detail, and may be missing entire features, and what is available is
> scattered all over the place.
> 
> Reading the TDPL book is a huge help for understanding D, it's
> essential reading for sure, but it's only an overview rather than a
> full text on the subject. The TDPL lacks many of the fine details
> that one needs to know in order to write proper D code. I find
> myself experimenting a lot in order to figure out what the various
> obscure details are, but without comprehensive documentation, I
> cannot be certain if the observed behaviours are actually correct or
> fully complete under all situations.

Ali's D book might be helpful: http://ddili.org/ders/d.en/index.html

But yeah, the current documentation needs work. Unfortunately, wishing
for it to happen won't make it happen, so if you contribute (use the
"improve this page" link) that would be great, and suggestions are also
helpful. I recently revised the docs for std.range to explain briefly
what ranges are and why we even need them, but this is only one piece of
the entire standard library. Many other modules need improved docs. And
there is still the need for a general overview to put everything in
perspective.


T

-- 
It is impossible to make anything foolproof because fools are so ingenious. -- Sammy
November 01, 2012
Re: A little Py Vs C++
On Thursday, 1 November 2012 at 19:44:04 UTC, H. S. Teoh wrote:
> On Thu, Nov 01, 2012 at 08:19:56PM +0100, Paulo Pinto wrote:
>> On Thursday, 1 November 2012 at 18:06:21 UTC, Peter Alexander 
>> wrote:
> [...]
>> >A more interesting comment is this one:
>> >
>> >"But the real problem here is that in order to achieve even 
>> >that,
>> >the complexity and amount of concepts you have to deal with in
>> >C++11 is mind boggling."
>> >
>> >The same is true in D. Well-written D code often does look 
>> >rather
>> >elegant, but the amount of understanding needed to write 
>> >beautiful
>> >D code is staggering.
>> 
>> I have to agree having to deal with lots of concepts.
>
> I don't see it as a problem, unless one is a programmer of the 
> drone
> persuasion. Many of D's concepts are liberatingly powerful, and 
> very
> potent in combination.
>
>
>> On the other hand, except for the programming drones, most D
>> concepts are also available in most mainstream languages.
> [...]
>
> If we want to minimize the number of concepts, we should 
> program using
> Lambda calculus. ;-) We already have lambda-syntax for 
> delegates, after
> all. Now just restrict all statements to only lambda 
> expressions, get
> rid of difficult concepts like arithmetic operators, variables 
> and
> imperative programming, and we have a winner on our hands.
>
> Seriously, though, imagining that one can program effectively 
> without
> learning new concepts is a preposterous proposition to me. I 
> just don't
> understand the unwillingness to learn.
>
>
> T

It is not the unwillingness to learn, rather the standard HR way 
of getting replaceable programming drones in most enterprises.

This was already discussed a few times.

--
Paulo
November 01, 2012
Re: A little Py Vs C++
On Thursday, 1 November 2012 at 19:49:42 UTC, Rob T wrote:
> On Thursday, 1 November 2012 at 18:06:21 UTC, Peter Alexander 
> wrote:
>>
>
> The number one missing item that I would love to get my hands 
> on is comprehensive documentaion. What we have now leaves out 
> far too much detail, and may be missing entire features, and 
> what is available is scattered all over the place.
>

Workaround: I find it useful to check the code of a 'std' module 
that interests me. A lot of unittests and comments are quite 
usefull. For ex. about the RAII/ref-counted stuff I checked the 
stdio.d File.
November 01, 2012
Re: A little Py Vs C++
Peter Alexander:

> The same is true in D. Well-written D code often does look 
> rather elegant, but the amount of understanding needed to write 
> beautiful D code is staggering.

It's almost impossible to keep languages simple. Some complexity 
comes from the desire to do more and more. As example see this 
recent request from Manu, it's simple, but it also increases the 
complexity of D:

http://d.puremagic.com/issues/show_bug.cgi?id=8108

Bye,
bearophile
« First   ‹ Prev
1 2 3 4 5
Top | Discussion index | About this forum | D home