Greetings. >> The main problem arises from the ambiguity for $array[-1] for arrays.>> But this is easily solvable: just introduce a slice operator. >> >> $array[:-1] and the ambiguity is gone.
>That would return an array containing the last item as the sole member, >not the last item itself. Which suggests a solution, namely either use another symbol or else attach to the colon a different meaning. Or, we can forget about applying this feature to arrays and hope that users will understand that this is a feature that only applies to strings and use a simple negative offset.SL