The `in' operator is rather useful actually, and guess what, Pike has it already! It's the index operator on multisets. (The Pascal `in' operator operated only on sets, not arrays, AFAICR.)
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
Previous text:
2003-04-02 12:04: Subject: ... and thanks for all the fish
Array my_array[0..3]={1,2,3,4}; Array my_array[-1..2]={1,2,3,4}; Although it could be a nice, truly obfuscating feature. :-)
Not that I advocate these sort of array intervalls, but...
Remember that Pascal was carried a *lot* of weight around mathematicians and for what it's worth - the ability of using negative indexing really helped students with a mathematical background.
Another great(!) and wounderfull feature was the 'in' operator in Pascal that allowed you to write
If 2 In my_array Then Begin ... End;
IIRC. I think these sort of natural constructs, in a human perspective, that really allowed Pascal to have such a huge user base.
Then again, I still get a warm fuzzy feeling inside when I see pascal code.
Hmm.. come to think of it, I don't think this was what Martin meant.
/ Peter Lundqvist (disjunkt)