On Thu, Jul 11, 2013 at 1:05 AM, Simen Kjaeraas wrote:
> On 2013-07-11, 00:52, Timothee Cour wrote:
>
> Why not support Tuple indexing and slicing with [] syntax?
>> (see below for a way to index/slice a tuple)
>>
>> void main(){
>> alias T=Tuple!(int,doubl
On 2013-07-11, 00:52, Timothee Cour wrote:
Why not support Tuple indexing and slicing with [] syntax?
(see below for a way to index/slice a tuple)
void main(){
alias T=Tuple!(int,double);
pragma(msg,T[0].stringof);//_expand_field_0
//pragma(msg,T[0..2].stringof); //Error: cannot slice
On Wed, Jul 10, 2013 at 6:16 PM, Jonathan M Davis wrote:
> On Wednesday, July 10, 2013 18:10:42 Timothee Cour wrote:
> > On Wed, Jul 10, 2013 at 5:49 PM, Artur Skawina
> wrote:
> > > On 07/11/13 00:52, Timothee Cour wrote:
> > > > Why not support Tuple in
On Wednesday, July 10, 2013 18:10:42 Timothee Cour wrote:
> On Wed, Jul 10, 2013 at 5:49 PM, Artur Skawina wrote:
> > On 07/11/13 00:52, Timothee Cour wrote:
> > > Why not support Tuple indexing and slicing with [] syntax?
> > >
> > > (see below for a way
On Wed, Jul 10, 2013 at 5:49 PM, Artur Skawina wrote:
> On 07/11/13 00:52, Timothee Cour wrote:
> > Why not support Tuple indexing and slicing with [] syntax?
> > (see below for a way to index/slice a tuple)
>
> Not sure I understand the question.
> I guess you'
On 07/11/13 00:52, Timothee Cour wrote:
> Why not support Tuple indexing and slicing with [] syntax?
> (see below for a way to index/slice a tuple)
Not sure I understand the question.
I guess you'd like this to work for some library pseudo-tuple type
- I've not looked at those, s
Timothee Cour:
Why not support Tuple indexing and slicing with [] syntax?
You need a syntax like:
a.slice!(1, 3);
I don't know why Walter didn't add support for a slicing syntax
for tuples. But it's an additive change, so it's not too much
late to add it, if it's f
Why not support Tuple indexing and slicing with [] syntax?
(see below for a way to index/slice a tuple)
void main(){
alias T=Tuple!(int,double);
pragma(msg,T[0].stringof);//_expand_field_0
//pragma(msg,T[0..2].stringof); //Error: cannot slice type 'Tuple!(int,
double)
pragma(msg,t