What is the current state of scope and member functions?

Dennis dkorpel at gmail.com
Tue Sep 12 09:26:02 UTC 2023


On Monday, 11 September 2023 at 00:12:29 UTC, Jonathan M Davis 
wrote:
> Well, I don't know what the overall pros and cons of the 
> current behavior are, but I found it to be very confusing.

In a templated struct, you can annotate member functions scope 
without it cluttering up the function type when the struct is 
instantiated without pointers.

> AFAIK, no other attributes magically disappear like that.

__gshared and shared disappear on immutable variables.

> DIP 1000 is already arguably overly complicated for what it 
> buys us, and I'd think that removing unnecessary complexity 
> with regards to what's going on with scope would be a good 
> thing.

We could try remove it.


More information about the Digitalmars-d mailing list