March 17, 2003
I'm currently reading Extended Pascal manual.

---8<---

12. Set extensions

A new operator >< is defined, which takes the symmetric difference of two set values; there is a new predefined function card which returns the cardinality of a set (the number of members present); and the FOR statement allows a new form in which the control variable is given in turn the values defined by a set.

    FOR n IN setvalue DO ...

--->8---

I've already heard something similar was intended. Just that it's not very practical without a "set" definition :) There it comes back - i remember to have seen some advocates of pascal "set" a long time ago.

If set is not introduced as a separate type, it should be possible to handle almost anything as a set. This might be good, since bitarrays and associative arrays have a kind of similar behaviour.

BTW, that leads me to an idea that a separate implementation of associative arrays can be made for small-ranged types. This would be better than a Pascal's set, since it was limited to no more than byte-indexed, and a associative array of bit has a similar semantics but is more flexible. Just the performance may be tuned? Is there a reasnoable way for 2 implementations to interact? I'll think about it.

-i.

1 2
Next ›   Last »