May 21, 2023
On Saturday, 20 May 2023 at 20:41:31 UTC, Richard (Rikki) Andrew Cattermole wrote:

>
> It makes a lot of sense looking at it in hindsight.
>
> The GC is just a fancy pants memory allocator after all.
>
> So the fact that we use the "GC language extensions" in CTFE is kinda irrelevant. It could just as easily work with malloc + free if somebody wanted to implement it.

Translation of Walters claim:

CTFE is much easier when you don't need to worry about life times.

A follow up question is if it would be just as easy with a GC based on RAII.
May 21, 2023
On Saturday, 20 May 2023 at 20:32:02 UTC, Walter Bright wrote:
>
> ImportC didn't go through the DIP process because it is not a D language feature - it's a compiler feature!

Even for the compiler, a new feature as significant as ImportC - that can have a profound effect on the 'use' of the language - should have gone through some process...at least.. before finding its way into the official source code respository.

Not to mention all the time and attention that has been directed to it as well, by so many people, including yourself, likely at the expense of other things. Sure, some would find the feature useful, I guess, but most people had to direct their attention to it because it just appeared and had to be dealt with.

'some kind' of approval process should have been followed (in relation to ImportC).

That seems self-evident to me.

I'm still bewildered why it's not self-evident to you as well.

May 22, 2023

On Sunday, 21 May 2023 at 23:04:40 UTC, Theo wrote:

>

'some kind' of approval process should have been followed (in relation to ImportC).

That seems self-evident to me.

I'm still bewildered why it's not self-evident to you as well.

I think people are modelling the DIP process as a "democratization" of the language. This is simply not the case. (And thank goodness!) For instance, there would be little point in having Walter file a DIP, as Walter is the person who decides whether to accept DIPs. What's he gonna do, reject his own feature?

The point of a DIP (as I understand it!) is this: it used to be the case that people would engage on these giant pull request fights in order to get a feature in the language, only to be told, very late in the process, after months of work had already gone into it, that the maintainers thought the feature didn't fit in with their vision of D. A DIP is a way to get a sort of preview, or "go/no-go", on whether a PR is likely to be merged if you embark on developing it. The forumgoers can comment on it, but their comments are strictly advisory. The point of the community review phase is not for the community to approve or disapprove a feature! It is merely to bring the DIP into its best technical form, writing, style, guideline adherence etc. The final decision remains, as it always has, with the language maintainers, Walter and Atila.

May 22, 2023
On Monday, 22 May 2023 at 06:22:02 UTC, FeepingCreature wrote:
>
> I think people are modelling the DIP process as a "democratization" of the language. This is simply not the case. (And thank goodness!) For instance, there would be little point in having Walter file a DIP, as Walter is the person who decides whether to accept DIPs. What's he gonna do, reject his own feature?

That's very misleading. I never suggested using the DIP for ImportC.

That probably would not have made sense at the time, nor now.

Given that impact ImportC would have on both the compiler, the broader use of ImportC, and the level of attention that both would subsequently require by maintainers/contributerts, it could have been brought up at one of their meetings, and discussed, instead of just appearing one day in the source tree as a PR with little significance, just wanting approval.

I accept that Walter holds a unique position, and I respect that as well.

But in the end, Walter is not the only one who has to deal with the addition of ImportC into the compiler, or the widespread use of ImportC. I think that is what he failed to contemplate at the time. I hope such a thing would not happen again. Of course, I also hope that those at these 'meetings' have come up with a way to ensure it doesn't happen again.

May 24, 2023

On Friday, 19 May 2023 at 19:01:46 UTC, GrimMaple wrote:

>

On Friday, 19 May 2023 at 18:37:05 UTC, IGotD- wrote:

>

If you have made a PR that is popular, the maintainers have no power to stop it which will only lead to that D eventually will be forked.

I roflmaoed. Walter has literally been blocking changes and even reverting commits based on personal preference, despite the majority of the community agreeing on the change. Important people left because of this in the past.

Good. As Coluche said, it's not because they are many to be wrong that they are right.

I do not know if Walter was justified in each of these instance specifically, but there needs to be someone guarding things aligned with the vision, and it's never "the community" that does that.

I'd be much more worried of any project where the leader does NOT do this from time to time.

May 25, 2023

On Friday, 19 May 2023 at 15:58:25 UTC, ryuukk_ wrote:

>

For example:

  • exception handing: why use EH when you can have your function return 2 values (error and result)

oh god no. it leads to horrible code. just take a look at go.

May 26, 2023

On Thursday, 25 May 2023 at 15:36:38 UTC, Commander Zot wrote:

>

On Friday, 19 May 2023 at 15:58:25 UTC, ryuukk_ wrote:

>

For example:

  • exception handing: why use EH when you can have your function return 2 values (error and result)

oh god no. it leads to horrible code. just take a look at go.

Go is an unusually atrocious implementation. In a not terrible language, it just looks like foo()?.bar()?.baz.

May 26, 2023

On Friday, 26 May 2023 at 12:42:41 UTC, FeepingCreature wrote:

>

Go is an unusually atrocious implementation. In a not terrible language, it just looks like foo()?.bar()?.baz.

The whole point of exceptions was to remove that kind of syntactic noise. I still don't understand why people want to throw away the convenience instead of fixing problems it has.

May 27, 2023
On 27/05/2023 1:28 AM, Max Samukha wrote:
> On Friday, 26 May 2023 at 12:42:41 UTC, FeepingCreature wrote:
>> Go is an unusually atrocious implementation. In a not terrible language, it just looks like `foo()?.bar()?.baz`.
> 
> The whole point of exceptions was to remove that kind of syntactic noise. I still don't understand why people want to throw away the convenience instead of fixing problems it has.

Replacement of the exception mechanism does not imply replacing exception syntax.

You can still have throw/try/catch syntax and use sumtypes to return a value or exceptions structs.

I.e. https://github.com/rikkimax/DIPs/blob/value_type_exceptions/DIPs/DIP1xxx-RC.md
May 26, 2023

On Friday, 26 May 2023 at 12:42:41 UTC, FeepingCreature wrote:

>

On Thursday, 25 May 2023 at 15:36:38 UTC, Commander Zot wrote:

>

On Friday, 19 May 2023 at 15:58:25 UTC, ryuukk_ wrote:

>

For example:

  • exception handing: why use EH when you can have your function return 2 values (error and result)

oh god no. it leads to horrible code. just take a look at go.

Go is an unusually atrocious implementation. In a not terrible language, it just looks like foo()?.bar()?.baz.

The problem of the optional access is understanding the side effects. It looks simple to use, and it really is, at first glance. The problem is that things are not necesarilly made to be shortcut (btw are they really shortcut ?).

So...

  1. with calls the problem is that actually it looks like very safe while it should be only used by the people who know very well the API... like maybe the thing should be called and having null as parameter is actually a meaningfull error (after all)
  2. optional accesses chains are not as well optimisable as AndAnd chains (which them are really shortcut)

it's a matter of knowing where to use them, like in cold paths it's ok.
But well maybe it's just my implementation that's bad.

Slightly off-topic but the question mark uses I really like, as said a few days ago, are ?= and the elvis (?? or ?:, etc. there might exist other syntaxes)