February 25, 2009

bearophile wrote:
> Weed:
>> We do not schoolgirls! :) Who is afraid of the complexity should use BASIC.
> 
> I like D1 mostly because it's quite less complex that C++, that's the first thing I ask to a new language like D. Complexity "kills".
> You probably don't want D, you want ATS:
> http://www.ats-lang.org/
> 
> Bye,
> bearophile

http://www.ats-lang.org/EXAMPLE/MISC/listquicksort.dats

Dear god.  I think... I think I'm going to go cry in the corner...

  -- Daniel
February 25, 2009

Weed wrote:
> bearophile пишет:
>> Weed:
>>> We do not schoolgirls! :) Who is afraid of the complexity should use BASIC.
>> I like D1 mostly because it's quite less complex that C++, that's the first thing I ask to a new language like D. Complexity "kills".
> 
> I am cite myself:
> "That is actually a model of classes D harder than C++."

Man, wish I could have done that when writing my thesis...

>> You probably don't want D, you want ATS: http://www.ats-lang.org/
> 
> There uses preprocessor. It is wrong.

Wow.  I dare say you're missing the forest for the trees.

  -- daniel
February 25, 2009
Daniel Keep пишет:
> 
> Weed wrote:
>> bearophile пишет:
>>> Weed:
>>>> We do not schoolgirls! :) Who is afraid of the complexity should use BASIC.
>>> I like D1 mostly because it's quite less complex that C++, that's the first thing I ask to a new language like D. Complexity "kills".
>> I am cite myself:
>> "That is actually a model of classes D harder than C++."
> 
> Man, wish I could have done that when writing my thesis...

:)

Sorry, this has already been discussed here: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=84842
February 25, 2009
On Wed, Feb 25, 2009 at 11:47 PM, Daniel Keep <daniel.keep.lists@gmail.com> wrote:
>
>
> bearophile wrote:
>> Weed:
>>> We do not schoolgirls! :) Who is afraid of the complexity should use BASIC.
>>
>> I like D1 mostly because it's quite less complex that C++, that's the first thing I ask to a new language like D. Complexity "kills".
>> You probably don't want D, you want ATS:
>> http://www.ats-lang.org/
>>
>> Bye,
>> bearophile
>
> http://www.ats-lang.org/EXAMPLE/MISC/listquicksort.dats
>
> Dear god.  I think... I think I'm going to go cry in the corner...

Even the helpful explanatory comment is baffling.  Sounds like the guy is boasting because he not only implemented Quicksort but managed to do it in such a way that the output not only has the same length as the input, but *also* is a permutation of the input!  Whoa!   Sheer genius!

--bb
February 25, 2009
Weed wrote:
> Christopher Wright пишет:
>> Weed wrote:
>>> As a result, classes will be slow, or require more code to achieve
>>> speeds comparable to C++.
>>>
>>> That is actually a model of classes D harder than C++.
>> Yes, C++ offers more unsafe optimizations than D.
> 
> 
> Straight to the point!
> I am choosing unsafe but fast code. Unsafe at so much on how much is
> unsafe any code on C++.
> 
> I think the issue is closed. :)

I spoke poorly. C++ enshrines unsafe optimizations as essential language features. D simply provides enough metaprogramming and low-level stuff that you can do it with a library. C++ gives you a revolver pointed at your foot, and you maneuver your target between the revolver and your foot. D gives you a kit to make a gun in 5 easy steps!!! and lets you point it at your foot if you want.

For instance, you can come up with templates that give you struct polymorphism. But you yourself said that that isn't a good idea, and that you should not use value types in a polymorphic manner.
February 26, 2009
Bill Baxter wrote:
> On Wed, Feb 25, 2009 at 11:47 PM, Daniel Keep
> <daniel.keep.lists@gmail.com> wrote:
>>
>> bearophile wrote:
>>> Weed:
>>>> We do not schoolgirls! :) Who is afraid of the complexity should use BASIC.
>>> I like D1 mostly because it's quite less complex that C++, that's the first thing I ask to a new language like D. Complexity "kills".
>>> You probably don't want D, you want ATS:
>>> http://www.ats-lang.org/
>>>
>>> Bye,
>>> bearophile
>> http://www.ats-lang.org/EXAMPLE/MISC/listquicksort.dats
>>
>> Dear god.  I think... I think I'm going to go cry in the corner...
> 
> Even the helpful explanatory comment is baffling.  Sounds like the guy
> is boasting because he not only implemented Quicksort but managed to
> do it in such a way that the output not only has the same length as
> the input, but *also* is a permutation of the input!  Whoa!   Sheer
> genius!
> 
> --bb

Is it one of those deals where he somehow explained to the compiler what he wants his algorithm to do, and then the compiler goes off and proves to itself that the algorithm actually does it or else barfs?
1 2 3 4
Next ›   Last »