I would like to suggest a slightly more expressive form for the translation
of array indexing operators x.(..) and x.[..]. In Dylan these get translated
into message sends to generic function "element" (or "aref" in the case of
multiple indices). Instead of translating as in OCAML to Array.get and
Array.set, they could be translated into some equivalent to
x.(n) -> module_of(type_of x).get(x, n)
This would allow us to develop modules containing refined versions of get,
set, unsafe_get, and unsafe_set to do whatever would be appropriate for the
object being indexed. Currently, I don't know of any operators named
"module_of" and "type_of" and these might in fact not make much sense given
the vast optimizations performed in the compiler -- there are not unique
tags for disparate data types since the language is type checked at compile
time.
Just some thoughts and wishes...
David McClain, Sr. Scientist
Raytheon Systems Co.
Tucson, AZ
This archive was generated by hypermail 2b29 : Wed Jan 19 2000 - 14:47:14 MET