On Sunday, 7 February 2016 at 07:31:51 UTC, tsbockman wrote:
On Sunday, 7 February 2016 at 07:00:04 UTC, Saurabh Das wrote:
On Sunday, 7 February 2016 at 03:16:48 UTC, tsbockman wrote:
(If we go with Saurabh Das' approach, we'll deprecate the old
slice() by ref method, so it there won't be any *silent*
breakage either way.)
Can we keep the old by ref slice() method, but add guards to
disallow cases where the alignment is off?
Honestly, I think it will just confuse people if the
slice-by-ref method only works on some seemingly-random subset
of Tuple instantiations - especially since the subset that
worked would be platform dependent.
We should either fix it, or deprecate it.
Contrary to my expectations, slicing bultin tuples returns a
copy. (http://dpaste.dzfl.pl/fd96b17e735d)
Maybe we need to fix this in the compiler. That way we can reuse
the language feature for std.typecons : Tuple.slice().