head const (again), but for free?

sighoya sighoya at gmail.com
Wed Jan 13 18:37:02 UTC 2021


On Wednesday, 13 January 2021 at 15:17:52 UTC, Ola Fosheim 
Grøstad wrote:
> No, readonly would be one-level immutable. Basically the same 
> as every other language. The only difference between readonly 
> and D's immutable is that you can have immutable pointers to 
> mutable data.
>
> What you are talking of is head const?

Yep, head const is usually readonly or better final, readonly 
should be transitive.


I just find it confusing to denote readonly as head immutable 
because readonly in other languages denote head const, that's it.


More information about the Digitalmars-d mailing list