[E-Lang] Operators #5: Additive operators
Tyler Close
tclose@oilspace.com
Mon, 09 Apr 2001 20:05:43 +0100
At 09:50 AM 4/9/01 -0700, Mark S. Miller wrote:
>Speaking of "<<", I had another bad form of surprise in a recent
>conversation with MarcS. At the beginning of the conversation, we were both
>enthused about the proposed use of "<<" and "<<=" for manipulating lists.
>Turns out, MarcS was enthused about a plausible misunderstanding of the
>proposal. When I said "push" he said "Wait. Don't you mean 'pop'?" He
>thought "<<" removed the zeroth element, rather than appended a last
>element, because only the first operation would have shifted the positions
>of all the other elements to the left.
>
>This misunderstanding makes so much sense that I'm no longer inclined to use
>"<<" or ">>" for this kind of list manipulation without a better
>"left-shift" or "right-shift" oriented rationale.
Has MarcS ever used the C++ iostreams? The use of these operators for
collections was mostly inspired by this use.
Tyler