Re: question on syntax[a,b,c]

new topic     » goto parent     » topic index » view thread      » older message » newer message

Salix wrote:
> 
> Hello,
> 
> I do not miss this option a lot but I would love to hear opinion. Currently
> the Euphoria syntax allows you to create new sequences (for printf() let's
> say)
> this way:
> 
> }}}
<eucode>
> sx={buffer[1],buffer[2],buffer[4],buffer[5],buffer[8],buffer[3],buffer[7]}
> -- or 
> sx=buffer[1..2]&buffer[4..5]&{buffer[5],buffer[8],buffer[3],buffer[7]}
> </eucode>
{{{

> 
> At the same time it would simplify the code a bit if you could say 
> 
> }}}
<eucode>
> sx=buffer[1,2,4,5,8,3,7]
> -- or 
> sx=buffer[{1,2,4,5,8,3,7}]
> </eucode>
{{{

> 
> Just to make it clear: apart from readabilty issues I do not see any
> advantage,
> so I do not propose it to be implemented. It's just that I'd like to know the
> reasons of this limitation.
> 
> Kind regards,
> 
> Salix

You can check the OpenEu specs at http://oedoc.free.fr for an even more
comprehensive slicing scheme, which include yours. Given the atmosphere, I'll
include it in a fork of the language rather than hinting at adding it in, perhaps
up in a few months.

CChris

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu