Yes I know, actually it was a deliberate choise to leave them outside the interface. Since i try to keep the interface as small as possible, just basic, and the +. -, /, %, &, | only work on some ADTs and not others i decided to put them on ADT level instead of on this interface level.
/ Peta, jo det är jag
Previous text:
2002-11-09 02:41: Subject: More about ADTs
I'm missing the `+, `-, `| and `& operations between ADTs of, at least, the same type. It would also be nice to have rotation and decreasing shifts on the ordered collections. Trivial example (since I felt my description wasn't as descriptive):
class ADT (array data) {
this_program rol() { data = data[1..] + data[0]; return this_object(); }
this_program ror() { data = data[-1] + data[..sizeof(data)-2]; return this_object(); }
mixed shl() { mixed ret = data[0]; data = data[1..]; return ret; }
mixed shr() { mixed ret = data[-1]; data = data[..sizeof(data)-2]; return ret; } }
/ Martin Nilsson (Fake Build Master)