Make int[12] convertible to int[]
Shachar Shemesh via Digitalmars-d
digitalmars-d at puremagic.com
Thu Dec 18 23:47:43 PST 2014
On 17/12/14 17:02, Adam D. Ruppe wrote:
> On Wednesday, 17 December 2014 at 13:13:43 UTC, Shachar Shemesh wrote:
>> It just seems like extra unneeded superfluous unnecessary redundancy.
>
> It is somewhat important because storing a slice to a static array is a
> big problem:
>
Any time you pass by reference a reference to a stack allocated
variable, this problem is there. I don't see how arrays are any different.
What's more, this is precisely why @safe and friends exist (and, if
memory serves me right, D actually catches and warns about the use case
you described).
Shachar
More information about the Digitalmars-d
mailing list