[Issue 12282] Immutable result of std.array.array

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 9 15:12:03 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12282



--- Comment #4 from bearophile_hugs at eml.cc 2014-03-09 15:11:59 PDT ---
(In reply to comment #3)

> Isn't it only const with "in" ? Not that it makes an actual difference here.

"in" means "scope const". Currently scope is not implemented, there is no DIP
and no one knows if and when it is coming.


> but I fear it would not work for
> generic types, which may themselves have indirections.

I think it can't work for generic types, unless D adds a region typing as Rust.


> Would this be legal? Or would it violate the "scope" constraint?
> 
> int*[] array(scope int*[] a) pure {}

Kenji, Walter, Timon and Andrei are the few persons able to think about all the
cases that can happen :)

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list