Thought about that, but "!" is a little problematic since it stands for a negation. Would foo![bar] return 0 or 1 if the element exists? The similarity with !foo[bar] suggests it'd return 0, but one could also disregard that and think it'd be 1. Either way we choose, it might be difficult to remember.
On a side note, the foo+[bar]=gnu and foo-[bar] syntaxes begin to feel more and more intuitive to me. I don't know about you, but I think they would be fairly easy to get used to.
/ Martin Stjernholm, Roxen IS
Previous text:
2002-11-12 12:00: Subject: Re: More about ADTs
On the same line, one could perhaps also dream up an operator to replace the use of zero_type(foo[bar]), which I've always considered a bit ugly since the single operation "index exists" is broken up in "lookup index" and "check for magic value".
I'd like that too; perhaps foo![bar], if we'd settle for foo+[bar]=baz and foo-[bar]?
/ Johan Sundström (ärkehertig av Lysators rootgrupp)