On Monday, 23 June 2025 at 10:37:58 UTC, Dom DiSc wrote:
I think scope should not be allowed on basic types, as it has no effect and is only confusing. I know, it would be needed to enable generic programming, but I find a function that can take both an int and an int* suspect anyway - this is kind of too generic for my taste.

This is more about the fact that D has a long history when it's about not checking attributes or storage classes when they are noop.

The situation toward that problem seems to be better than a few years ago, however things like

```
struct S
{
    pure a = 0;
}
```

are still compilable.
  • scope parameter ... Neto via Digitalmars-d-learn
    • Re: scope p... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
      • Re: sco... Dom DiSc via Digitalmars-d-learn
        • Re:... user1234 via Digitalmars-d-learn
        • Re:... Dennis via Digitalmars-d-learn
          • ... Jonathan M Davis via Digitalmars-d-learn
          • ... Quirin Schroll via Digitalmars-d-learn
            • ... Jonathan M Davis via Digitalmars-d-learn

Reply via email to