November 24, 2021

On Wednesday, 24 November 2021 at 06:48:12 UTC, zjh wrote:

>

The funniest part is that it's often not the deep users of D who say D is bad.

Brags about other languages, and is critical of D.
Bad money drives out good money.

November 24, 2021
On Wednesday, 24 November 2021 at 05:29:54 UTC, Timon Gehr wrote:
> On 23.11.21 14:41, Atila Neves wrote:
>> On Tuesday, 16 November 2021 at 02:14:22 UTC, Timon Gehr wrote:
>>> [...]
>> 
>> I don't see any good reason to shut it down, never mind stupid reasons.
>
> There are some details such as ABI and sizeof(()). I'll probably get back to this by January. (Some other commitments will have ended by then.)

That will be highly appreciated.
Is there anything we could do to help you?

Can I buy you a coffee/pizza/beer/scotch/.. ?
December 17
On Monday, 11 October 2021 at 15:59:10 UTC, Atila Neves wrote:
> * Worst features implemented in a non-toy language
> * Worst features (in your opinion) in D

I am a bit late to this party :) but after reading all 29 pages of it I would say most of it is said except this one thing:

I hate language constructs that go in opposite order from my thoughts making me type something then having to navigate back to add another thing. Best example for this is casting in any language. I always have to write cast operator before the thing I am casting yet in my head I never think "then I need to cast to int the variable X that I want to add". I think more like "Then I need to add variable X but I have to cast it to int".
December 17

On Friday, 17 December 2021 at 13:14:50 UTC, Igor wrote:

>

On Monday, 11 October 2021 at 15:59:10 UTC, Atila Neves wrote:

>
  • Worst features implemented in a non-toy language
  • Worst features (in your opinion) in D

I am a bit late to this party :) but after reading all 29 pages of it I would say most of it is said except this one thing:

I hate language constructs that go in opposite order from my thoughts making me type something then having to navigate back to add another thing. Best example for this is casting in any language. I always have to write cast operator before the thing I am casting yet in my head I never think "then I need to cast to int the variable X that I want to add". I think more like "Then I need to add variable X but I have to cast it to int".

You must love the to template in std.conv then :P

December 17
On Thursday, 11 November 2021 at 02:20:50 UTC, Timon Gehr wrote:
> "Add an empty invariant to your types for maximum type safety", "we have constructors, but your types have to cope with arbitrary bit patterns anyway" or "this thing is @safe but some compiler backends may treat it as UB anyway" are The Last Thing D Needs.

This is unfortunately true. This is pervasive in D and by far the biggest practical problem with it.
December 17
On Monday, 15 November 2021 at 14:09:53 UTC, Paul Backus wrote:
> On Monday, 15 November 2021 at 14:02:42 UTC, Imperatorn wrote:
>>
>> What's wrong about retro? Too retro :D
>
> std.range.retro is honestly just a bad name. It should have been `reversed`, or maybe `reverser`.

```
alias reversed = retro;
```

Problem solved :)
December 17

On Friday, 17 December 2021 at 13:14:50 UTC, Igor wrote:

>

On Monday, 11 October 2021 at 15:59:10 UTC, Atila Neves wrote:

>
  • Worst features implemented in a non-toy language
  • Worst features (in your opinion) in D

I am a bit late to this party :) but after reading all 29 pages of it I would say most of it is said except this one thing:

I hate language constructs that go in opposite order from my thoughts making me type something then having to navigate back to add another thing. Best example for this is casting in any language. I always have to write cast operator before the thing I am casting yet in my head I never think "then I need to cast to int the variable X that I want to add". I think more like "Then I need to add variable X but I have to cast it to int".

In sql you can write cast(field as type).

Also in c# you can write variable as type, even the semantics are not 100% equivalent to the usual cast operator ().

December 17

On Friday, 17 December 2021 at 13:33:00 UTC, Tejas wrote:

>

On Friday, 17 December 2021 at 13:14:50 UTC, Igor wrote:

>

On Monday, 11 October 2021 at 15:59:10 UTC, Atila Neves wrote:

>

[...]

I am a bit late to this party :) but after reading all 29 pages of it I would say most of it is said except this one thing:

I hate language constructs that go in opposite order from my thoughts making me type something then having to navigate back to add another thing. Best example for this is casting in any language. I always have to write cast operator before the thing I am casting yet in my head I never think "then I need to cast to int the variable X that I want to add". I think more like "Then I need to add variable X but I have to cast it to int".

You must love the to template in std.conv then :P

That's indeed a good way to have cast as postfix expressions except that to is more than cast, as it also checks for overflow and can throw.

December 17

On Friday, 17 December 2021 at 17:50:25 UTC, user1234 wrote:

>

On Friday, 17 December 2021 at 13:33:00 UTC, Tejas wrote:

>

On Friday, 17 December 2021 at 13:14:50 UTC, Igor wrote:

>

[...]

You must love the to template in std.conv then :P

That's indeed a good way to have cast as postfix expressions except that to is more than cast, as it also checks for overflow and can throw.

Those are not good things?

December 18

On Monday, 15 November 2021 at 14:19:00 UTC, Steven Schveighoffer wrote:

>

On 11/15/21 7:41 AM, Timon Gehr wrote:

>

In particular, there is static foreach_reverse.

Although it's fallen mostly out of style, the reason I hated foreach_reverse is because it used to be applicable to delegate iteration, but just iterates forward (I've just checked and it's deprecated, but not disabled).

Maybe this is older. When I came to D around 2015, I learned that there is opApply for forward iteration (foreach) and opApplyReverse for reverse iteration (foreach_reverse). I just tried defining a struct with opApply, but no opApplyReverse, and then foreach_reverse on an instance (on run.dlang.io). Doesn't work.