[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: variable indices



>:> Perhaps there should be another operator (':'? it's not doing anything)
>
>Oh no! I don't want to have to escape every colon in rcp host:file ...
>It's enough of a pain to have to say make CC\=gcc.  Please, don't move
>in the direction of making every non-alphanumeric character special to
>es.
>
>:> ; whatis { a = $list:2-,5-8 }
>
>Problem with lexical analysis.  What should $n-8 be parsed as?  $(n-8)
>like it is today, or $n^-8?  I like being able to use the hyphen in
>variable names without needing parentheses.

I agree completely with Harald.  I even use colons in variable names, in a
CLish sort of way.

How many other languages let you specify non-contiguous ranges with a
single reference anyway?  How often do you *need* to do it interactively?
That's about the only justification I can think of for adding this sort of
feature at all.  For writing scripts, I do not think shorthand notation is
nearly as important.  I would much rather preserve the remaining clarity of
the language.  

There is simply too little to be gained from compacting

        a = $b(2 ... 3) $b(5 ... 8) $b(200 ...)

further, and a lot to lose.