June 28, 2022

On Tuesday, 28 June 2022 at 11:25:53 UTC, WebFreak001 wrote:

>
int width() => shape.match!(
    (Box b) => b.width,
    (Circle c) => c.radius * 2
);

Thank you for providing excellent example for an argument against this DIP. To a person who haven't coded in D for a while it was hard to understand what that code did. Also this is prime example to all people who talked about one line functions in classes that intentions != results.

After looking at it for longer I think I can make this example a little more confusing.

int width()   => shape.match!(
   (Box b)    => b.width,
   (Circle c) => c.radius * 2
);
June 29, 2022
On 29/06/2022 1:38 AM, welkam wrote:
> Thank you for providing excellent example for an argument against this DIP.

The code that you are quoting is already valid D.

```d
string name()          => "abc";
double calculateArea() => 5.3f;
```

This is not and will be with this DIP.

It is extending existing syntax to a place where it should have been supported all along.
June 28, 2022

On 6/28/22 9:17 AM, welkam wrote:

>

Go was designed by a very senior programmers to be simple for a reason. They wanted to prevent junior programmers from writing "clever" code. They made the language the way it is so all code could be easily understood by anyone. Simplicity has a value.

Many very senior developers choose to start new project in C because it is simple.

These languages still exist, and are fine choices for you to make!

-Steve

June 28, 2022
On 6/28/22 12:37, welkam wrote:
> On Wednesday, 15 June 2022 at 09:21:12 UTC, Mike Parker wrote:
>> This is the discussion thread for the Final Review of DIP 1043, "Shortened Method Syntax":
>>
>> https://github.com/dlang/DIPs/blob/2c2f6c33f5761236266a96bd268c62a06323a5e8/DIPs/DIP1043.md 
>>
>>
>> The review period will end at 11:59 PM ET on June 29, or when I make a post declaring it complete. Discussion in this thread may continue beyond that point.
>>
>> Here in the discussion thread, you are free to discuss anything and everything related to the DIP. Express your support or opposition, debate alternatives, argue the merits, etc.
>>
>> However, if you have any specific feedback on how to improve the proposal itself, then please post it in the feedback thread. The feedback thread will be the source for the review summary I write at the end of this review round. I will post a link to that thread immediately following this post. Just be sure to read and understand the Reviewer Guidelines before posting there:
>>
>> https://github.com/dlang/DIPs/blob/master/docs/guidelines-reviewers.md
>>
>> And my blog post on the difference between the Discussion and Feedback threads:
>>
>> https://dlang.org/blog/2020/01/26/dip-reviews-discussion-vs-feedback/
>>
>> Please stay on topic here. I will delete posts that are completely off-topic.
> 
> Burn this dip with fire. There were a lot of talks about readability here but from what I can tell people mean two different things when they use the word readability. One is easy on the eyes, pleasant to look at. The other meaning would be its easy to understand what the code is just by glancing at it.
> 
> Proposed changes would succeed in making code less noisy and easier on the eyes but it will also harm scanability of the code.

The opposite is the case.

> Programmers rely on visual patters to understand the code.

This is just another pattern, a rather distinctive one and one that is mostly already in the language.

> Go language is the way it is for valid reasons. Don't dismiss them easily. 

Why not? I dislike Go for valid reasons.
June 28, 2022

On Wednesday, 15 June 2022 at 09:21:12 UTC, Mike Parker wrote:

>

Here in the discussion thread, you are free to discuss anything and everything related to the DIP. Express your support or opposition, debate alternatives, argue the merits, etc.

I left specific feedback at the feedback thread, but I want to mention here that I still support this DIP. It's nothing groundbreaking, but small and simple improvements like this are just as important as grand schemes.

June 29, 2022
On 28.06.22 15:38, welkam wrote:
> On Tuesday, 28 June 2022 at 11:25:53 UTC, WebFreak001 wrote:
>> ```d
>> int width() => shape.match!(
>>     (Box b) => b.width,
>>     (Circle c) => c.radius * 2
>> );
>> ```
> Thank you for providing excellent example for an argument against this DIP. To a person who haven't coded in D for a while it was hard to understand what that code did.

Matching a couple of parentheses is not particularly D-specific.
June 29, 2022

On Tuesday, 28 June 2022 at 11:31:39 UTC, zjh wrote:

>

Have to establish this concept: => is a 'one sentence function'!

Vim9 has come out, even 'VIM' has =>!

June 29, 2022
On Tuesday, 28 June 2022 at 16:32:46 UTC, Timon Gehr wrote:
>
>> Go language is the way it is for valid reasons. Don't dismiss them easily.
>
> Why not? I dislike Go for valid reasons.

Most people do.

Go is a terrible example for a good language.

Go only has one advantage and that's Google backing.
June 29, 2022

On Wednesday, 29 June 2022 at 05:54:49 UTC, bauss wrote:

>

Go only has one advantage and that's Google backing.

Google hasn't let you suffer yet?

June 29, 2022

On Wednesday, 29 June 2022 at 06:05:38 UTC, zjh wrote:

>

On Wednesday, 29 June 2022 at 05:54:49 UTC, bauss wrote:

>

Go only has one advantage and that's Google backing.

Google hasn't let you suffer yet?

Depends, many things have made me suffer, D has too.