Jump to page: 1 29  
Page
Thread overview
Blog post: What D got wrong
Dec 11, 2018
Atila Neves
Dec 11, 2018
user1234
Dec 11, 2018
Atila Neves
Dec 11, 2018
Mike Wey
Dec 11, 2018
Guillaume Piolat
Dec 11, 2018
Nicholas Wilson
Dec 11, 2018
Atila Neves
Dec 12, 2018
Walter Bright
Dec 19, 2018
Vijay Nayar
Dec 19, 2018
Neia Neutuladh
Dec 19, 2018
Rubn
Dec 20, 2018
Atila Neves
Dec 11, 2018
Adam D. Ruppe
Dec 11, 2018
Atila Neves
Dec 11, 2018
0xEAB
Dec 11, 2018
Guillaume Piolat
Dec 11, 2018
dayllenger
Dec 12, 2018
Atila Neves
Dec 12, 2018
Guillaume Piolat
Dec 12, 2018
JN
Dec 11, 2018
12345swordy
Dec 11, 2018
H. S. Teoh
Dec 12, 2018
Kagamin
Dec 12, 2018
Jonathan M Davis
Dec 12, 2018
H. S. Teoh
Dec 11, 2018
jmh530
Dec 11, 2018
Daniel Kozak
Dec 11, 2018
Simen Kjærås
Dec 11, 2018
H. S. Teoh
Dec 11, 2018
Dukc
Dec 12, 2018
Meta
Dec 12, 2018
Mike Franklin
Dec 11, 2018
H. S. Teoh
Dec 11, 2018
H. S. Teoh
Dec 12, 2018
Meta
Dec 13, 2018
Jonathan M Davis
Dec 13, 2018
RazvanN
Dec 13, 2018
Guillaume Piolat
Dec 13, 2018
Atila Neves
Dec 13, 2018
RazvanN
Dec 13, 2018
H. S. Teoh
Dec 13, 2018
jmh530
Dec 13, 2018
Adam D. Ruppe
Dec 13, 2018
dayllenger
Dec 13, 2018
Neia Neutuladh
Dec 13, 2018
Paolo Invernizzi
Dec 18, 2018
Pjotr Prins
Dec 18, 2018
Jonathan M Davis
Dec 18, 2018
Pjotr Prins
Dec 19, 2018
Jonathan M Davis
Dec 19, 2018
H. S. Teoh
Dec 20, 2018
Walter Bright
Dec 20, 2018
Dgame
Dec 20, 2018
Daniel Kozak
Dec 20, 2018
Neia Neutuladh
Dec 15, 2018
Nathan S.
Dec 15, 2018
Atila Neves
Dec 17, 2018
Russel Winder
Dec 17, 2018
Dukc
Dec 17, 2018
Dukc
Dec 19, 2018
Jonathan M Davis
Dec 17, 2018
Atila Neves
Dec 18, 2018
Kagamin
Dec 17, 2018
Walter Bright
Dec 18, 2018
Russel Winder
Dec 18, 2018
Kagamin
Dec 18, 2018
Russel Winder
Dec 18, 2018
Kagamin
Dec 18, 2018
bachmeier
Dec 18, 2018
Russel Winder
Dec 18, 2018
Neia Neutuladh
Dec 18, 2018
Russel Winder
Dec 18, 2018
Mike Wey
Dec 18, 2018
H. S. Teoh
Dec 19, 2018
Jonathan M Davis
Dec 19, 2018
Nathan S.
Dec 19, 2018
Neia Neutuladh
Dec 19, 2018
Russel Winder
Dec 13, 2018
Neia Neutuladh
Dec 15, 2018
evilrat
Dec 19, 2018
Jonathan M Davis
December 11, 2018
A few things that have annoyed me about writing D lately:

https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/
December 11, 2018
On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote:
> A few things that have annoyed me about writing D lately:
>
> https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/

I agree about template lambdas. But is something that misses really an error ?
December 11, 2018
On Tuesday, 11 December 2018 at 11:08:29 UTC, user1234 wrote:
> On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote:
>> A few things that have annoyed me about writing D lately:
>>
>> https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/
>
> I agree about template lambdas. But is something that misses really an error ?

It's debatable. I thought it was funny that it was an oversight given the fact that D had lambdas to avoid the problems that C++ used to have, then went and made the "same" mistake again.
December 11, 2018
On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote:
> A few things that have annoyed me about writing D lately:
>
> https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/

Really great article. I like the "UFCS for templates" idea.
12 years in and I still don't know what @property is for!


> . The way to do eponymous templates right is to (obviously renaming the feature) follow D’s own lead here and use either this or This to refer to itself.

Brilliant.
December 11, 2018
On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote:
> A few things that have annoyed me about writing D lately:
>
> https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/

Nice!

I like the eponymous templates idea, though it might get confusing with doubly nested eponymous templates and with mixin templates injecting constructors ( https://run.dlang.io/is/UYakit )

We really do need to figure out what to do with @property

> Returning a reference

Wow, thats f*ck'n stupid! https://run.dlang.io/is/SAplYw

> Variables can’t be ref

not _quite true, foreach variables can be.




December 11, 2018
On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote:
> A few things that have annoyed me about writing D lately:
>
> https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/

If @property worked for a thing to return a delegate, it would be useful.

But noooo, we got worked up over syntax and forgot about semantics :(
December 11, 2018
On Tuesday, 11 December 2018 at 12:52:20 UTC, Adam D. Ruppe wrote:
> On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote:
>> A few things that have annoyed me about writing D lately:
>>
>> https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/
>
> If @property worked for a thing to return a delegate, it would be useful.
>
> But noooo, we got worked up over syntax and forgot about semantics :(

@property is useful for setters. Now, IMHO setters are a code stink anyway but sometimes they're the way to go. I have no idea what it's supposed to do for getters (nor am I interested in learning or retaining that information) and never slap the attribute on.
December 11, 2018
On Tuesday, 11 December 2018 at 12:51:56 UTC, Nicholas Wilson wrote:
> On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote:
>> A few things that have annoyed me about writing D lately:
>>
>> https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/
>
> Nice!

Thanks!

>
> I like the eponymous templates idea, though it might get confusing with doubly nested eponymous templates

I'd say it would refer to the innermost template.

> and with mixin templates injecting constructors ( https://run.dlang.io/is/UYakit )

I'd say it wouldn't work in mixin templates - is there such a thing as an eponymous mixin template now?

> We really do need to figure out what to do with @property
>
>> Returning a reference
>
> Wow, thats f*ck'n stupid! https://run.dlang.io/is/SAplYw

You're telling me - how do you think I found out? ;)

>> Variables can’t be ref
>
> not _quite true, foreach variables can be.

That's true and a weird edge case.
December 11, 2018
On Tuesday, 11 December 2018 at 12:57:03 UTC, Atila Neves wrote:
> On Tuesday, 11 December 2018 at 12:52:20 UTC, Adam D. Ruppe wrote:
>> On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote:
>>> A few things that have annoyed me about writing D lately:
>>>
>>> https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/
>>
>> If @property worked for a thing to return a delegate, it would be useful.
>>
>> But noooo, we got worked up over syntax and forgot about semantics :(
>
> @property is useful for setters. Now, IMHO setters are a code stink anyway but sometimes they're the way to go. I have no idea what it's supposed to do for getters (nor am I interested in learning or retaining that information) and never slap the attribute on.

Well, one can use it for optics :)


@property
{
    int x()
    {
        return this._x;
    }

    void x(int value)
    {
        this._x = value;
    }
}
December 11, 2018
On Tuesday, 11 December 2018 at 13:08:18 UTC, 0xEAB wrote:
>
> Well, one can use it for optics :)
>
>
> @property
> {
>     int x()
>     {
>         return this._x;
>     }
>
>     void x(int value)
>     {
>         this._x = value;
>     }
> }

One could say getters and particularly setters don't really deserve a nicer way to write them. It's a code stink, it deserve a long ugly name.  (10 years ago I would be in the other camp)
« First   ‹ Prev
1 2 3 4 5 6 7 8 9