September 21, 2014
On Saturday, 20 September 2014 at 12:39:23 UTC, Tofu Ninja wrote:
> There was a recent video[1] by Jonathan Blow about what he would want in a programming language designed specifically for game development. Go, Rust, and D were mentioned and his reason for not wanting to use D is is that it is "too much like C++" although he does not really go into it much and it was a very small part of the video it still brings up some questions.
>
> What I am curious is what are the worst parts of D? What sort of things would be done differently if we could start over or if we were designing a D3? I am not asking to try and bash D but because it is helpful to know what's bad as well as good.
>
> I will start off...
> GC by default is a big sore point that everyone brings up
> "is" expressions are pretty wonky
> Libraries could definitely be split up better
>
> What do you think are the worst parts of D?
>
> [1] https://www.youtube.com/watch?v=TH9VCN6UkyQ

 1. Accidental complexity.
 2. Introducing hacks to solve issues instead of going for a clean solution, because it reduce complexity in the short run (and create 1. on the long run).
September 21, 2014
"Tofu Ninja"  wrote in message news:nwjquvwnetifhydfabhg@forum.dlang.org...

> On Saturday, 20 September 2014 at 23:07:16 UTC, Adam D. Ruppe wrote:
> >> string results[](T) = "I have no idea what I'm doing";
> >
> > I agree that's just weird though, someone pointed that out to me on IRC and I was even like wtf. I had thought I've seen it all until then.
>
> I literally don't even know what to expect this to do.

template results(T)
{
   string[] results = "I have no idea what I'm doing";
}

Which won't instantiate because string doesn't convert to string[].

A fun mix of C-style array syntax, shortened template declaration syntax and a semantic error. 

September 21, 2014
On Saturday, 20 September 2014 at 12:39:23 UTC, Tofu Ninja wrote:
>
> What do you think are the worst parts of D?
>

Proper D code is supposed to have lots of attributes (pure const nothrow @nogc) that brings little and makes it look bad.
September 21, 2014
On Sunday, 21 September 2014 at 00:07:36 UTC, Vladimir Panteleev wrote:
> On Saturday, 20 September 2014 at 12:39:23 UTC, Tofu Ninja wrote:
>> What do you think are the worst parts of D?
>
> The regressions!
>
> https://issues.dlang.org/buglist.cgi?bug_severity=regression&list_id=106988&resolution=---
>
> I filed over half of those...

I guess you found them using your own code base? Maybe it would make sense to add one or more larger projects to the autotester, in addition to the unit tests. They don't necessarily need to be blocking, just a notice "hey, your PR broke this and that project" would surely be helpful to detect the breakages early on.
September 21, 2014
On 09/21/2014 09:05 AM, Daniel Murphy wrote:
> "Tofu Ninja"  wrote in message news:nwjquvwnetifhydfabhg@forum.dlang.org...
>
>> On Saturday, 20 September 2014 at 23:07:16 UTC, Adam D. Ruppe wrote:
>> >> string results[](T) = "I have no idea what I'm doing";
>> >
>> > I agree that's just weird though, someone pointed that out to me on
>> IRC > and I was even like wtf. I had thought I've seen it all until then.
>>
>> I literally don't even know what to expect this to do.
>
> template results(T)
> {
>     string[] results = "I have no idea what I'm doing";
> }
>
> Which won't instantiate because string doesn't convert to string[].
>
> A fun mix of C-style array syntax, shortened template declaration syntax
> and a semantic error.

When was int x(T)=2; introduced? Also, C-style array syntax would actually be string results(T)[] = "";.
September 21, 2014
On Saturday, 20 September 2014 at 12:39:23 UTC, Tofu Ninja wrote:
> [1] https://www.youtube.com/watch?v=TH9VCN6UkyQ

The worst part is programmers unable to express their ideas in written form.
September 21, 2014
On 9/21/14, 1:27 AM, ponce wrote:
> On Saturday, 20 September 2014 at 12:39:23 UTC, Tofu Ninja wrote:
>>
>> What do you think are the worst parts of D?
>>
>
> Proper D code is supposed to have lots of attributes (pure const nothrow
> @nogc) that brings little and makes it look bad.

No because deduction. -- Andrei
September 21, 2014
On Saturday, 20 September 2014 at 12:39:23 UTC, Tofu Ninja wrote:
> There was a recent video[1] by Jonathan Blow about what he would want in a programming language designed specifically for game development. Go, Rust, and D were mentioned and his reason for not wanting to use D is is that it is "too much like C++" although he does not really go into it much and it was a very small part of the video it still brings up some questions.
>
> What I am curious is what are the worst parts of D? What sort of things would be done differently if we could start over or if we were designing a D3? I am not asking to try and bash D but because it is helpful to know what's bad as well as good.
>
> I will start off...
> GC by default is a big sore point that everyone brings up
> "is" expressions are pretty wonky
> Libraries could definitely be split up better
>
> What do you think are the worst parts of D?
>
> [1] https://www.youtube.com/watch?v=TH9VCN6UkyQ

There are so many it is hard to chose worst offenders.
September 21, 2014
On Sun, Sep 21, 2014 at 08:49:38AM +0000, via Digitalmars-d wrote:
> On Sunday, 21 September 2014 at 00:07:36 UTC, Vladimir Panteleev wrote:
> >On Saturday, 20 September 2014 at 12:39:23 UTC, Tofu Ninja wrote:
> >>What do you think are the worst parts of D?
> >
> >The regressions!
> >
> >https://issues.dlang.org/buglist.cgi?bug_severity=regression&list_id=106988&resolution=---
> >
> >I filed over half of those...
> 
> I guess you found them using your own code base? Maybe it would make sense to add one or more larger projects to the autotester, in addition to the unit tests. They don't necessarily need to be blocking, just a notice "hey, your PR broke this and that project" would surely be helpful to detect the breakages early on.

This has been suggested before. The problem is resources. If you're willing to donate equipment for running these tests, it would be greatly appreciated, I believe.

For my part, I regularly try compiling my own projects with git HEAD, and filing any regressions I find.


T

-- 
Arise, you prisoners of Windows / Arise, you slaves of Redmond, Wash, / The day and hour soon are coming / When all the IT folks say "Gosh!" / It isn't from a clever lawsuit / That Windowsland will finally fall, / But thousands writing open source code / Like mice who nibble through a wall. -- The Linux-nationale by Greg Baker
September 21, 2014
On Sun, Sep 21, 2014 at 08:27:56AM +0000, ponce via Digitalmars-d wrote:
> On Saturday, 20 September 2014 at 12:39:23 UTC, Tofu Ninja wrote:
> >
> >What do you think are the worst parts of D?
> >
> 
> Proper D code is supposed to have lots of attributes (pure const nothrow @nogc) that brings little and makes it look bad.

To be fair, though, hindsight is always 20/20. Had we known earlier that we would have these attributes, they would've been default to begin with, and you'd have to explicitly ask for impure / mutable / throwing / @withgc.

But on the positive side, the compiler will automatically infer attributes for template functions, and lately I've been tempted to write templated functions by default just to get the attribute inference bonus, even if it's just translating fun(a,b,c) to fun()(a,b,c). The caller site never has to change, and the function is never instantiated more than once -- and you get the added bonus that if the function is never actually called, then it doesn't even appear in the executable.

Attribute inference is the way to go, IMO. Research has shown that people generally don't bother with writing properly-attributed declarations -- it's too tedious and easily overlooked. Having "nicer" attributes be the default helps somewhat, but attribute inference is ultimately what might actually stand a chance of solving this problem.


T

-- 
"Holy war is an oxymoron." -- Lazarus Long