[net.lang.mod2] Open Array

cjl@iuvax.UUCP (12/04/83)

#N:iuvax:8600004:000:915
iuvax!cjl    Dec  3 18:22:00 1983


     The manual I have "Progamming in Modula-2" seems to suggest  that
open array is a descent feature like Ada's unconstraint arrays.  But I
think the idea of "open array" should be classified  as  a  low  level
feature for the following reasons :

 (1) It actually models the sequence data structure. The compatibility
to  arrays  of  any  index type belongs to the structure compatibility
domain not the strong type idea.
 (2) Even two data sets having the same data  structures,  they  don't
have  to  have  the  same type names because we might want to classify
them as different abstract data types.
 (3) The use of "open array" is to allow  sharing  of  array  handling
procedures. It is an implementation issue not a high level concept.

     For the above reasons, Modula-2 actually offers a better solution
than Ada's unconstraint arrays where the problem may still exist if we
use different type names.