[Issue 8910] Static arrays, dynamic arrays and std.array.join

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 31 03:49:49 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8910



--- Comment #20 from bearophile_hugs at eml.cc 2012-10-31 03:48:25 PDT ---
(In reply to comment #19)
> Slicing static arrays is unsafe

That's true because the type system of D is primitive. In a little more refined
type system, this is not true.


> If it were up to
> me, static arrays would _never_ be implicitly sliced precisely because of how
> dangerous it is. It's useful and should be permitted, but it should be
> explicit.

But this is unrelated to this enhancement request, because it's easy to write a
join() on fixed-sized 2D matrix that is safe.

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


More information about the Digitalmars-d-bugs mailing list