No, the insert lfun is not `[]=. The difference is that the insert operation always adds an element, causing a duplicate index if necessary. On mappings it would either be undefined or throw an error if the index already exists.
/ Martin Stjernholm, Roxen IS
Previous text:
2002-11-10 16:18: Subject: Re: More about ADTs
Perhaps we can come up with a new operator syntax instead?
That would be nice.
I got this idea, how about using a form like
x[y]=; or x[y]=void;
for delete? Is that doable? That doesn't solve the problem with a delete lfun, though. (The insert lfun is obviously "`[]="...?)
/ Brevbäraren