hi,
i'd like to discuss the implementation of [<x..<y].
i do not agree with the current way of addressing the last element as "<0". this is counter-intuitive. i think it makes more sense to have "-x" and "<x" to mean the same, so [..<2] means what most people think [..-2] should mean.
consider the explanation: [-x] counts from the end. 0 has no negative value, so -1 is the last element. however in a range -x is always reduced to 0. to count from the end in a range use <x.
now if "-x" and "<x" would mean the same, you could just end there. as it is now you have to add an extra paragraph to explain the difference.
changing this would as a bonus also make this compatible with lpc (at least as implemented in ldmud)
i noticed this while ago, but only now managed to get pike 7.7 built on my machine after i came up with the idea of using pikefarm to always have an up-to-date binary without having to build one myself everytime.
greetings, martin.
How about reviewing the discussion the went on before deciding to implement <x instead of -x?
good idea, thank you. completely forgot about that discussion.
i can't believe that this is already 2.5 years ago. it is really time to get pike 7.8 released or else noone will remember all the stuff that was added since 7.6.
well, at least i proved marcus agehalls point:
peter> What, we don't get to have the index-from-the-end-discussion every year any more? marcus> Sure we get to have them again. So far, I don't think anyone has opposed the concept as such. The big problem has always been syntax and obscure semantics. And those can resurface at any time... ;)
i better go back into hiding now and work on getting the tab-completion code committed...
pike-devel@lists.lysator.liu.se