Wishlist proposal, documenting fn arg as in or out or mod

Dom DiSc dominikus at scherkl.de
Fri Jun 23 06:12:16 UTC 2023


On Friday, 23 June 2023 at 02:24:07 UTC, Steven Schveighoffer 
wrote:
>
> `const` is both a type modifier, and a storage class. When used 
> as a storage class, it means the type specified is attributed 
> with the `const` type modifier. In certain contexts, it also 
> can indicate that the variable should be stored in ROM.
>
> So `const ref Type` makes sense, the `const` means "apply the 
> `const` type modifier to the stored type".
>
> So `const ref Type` is the same as `ref const Type` or `ref 
> const(Type)`, the canonical form.

Pew, ok. I was just about to change a LOT of my code...
Glad I'm not as stupid as I thought.


More information about the Digitalmars-d mailing list