Marko Rauhamaa <[email protected]> writes:

> Dynamic programming languages lack a true, efficient dot notation.

If with a "true, efficient dot notation" you mean for example C structs,
then records fill that role except for using accessor procedures instead
of syntax.

(Under the right conditions, usage of records could compile to direct
O(1) memory access (pointer+offset), just like usage of vectors.  Arrays
and structs in C are in direct analogy to vectors and records in Scheme;
the only difference being Scheme's general requirement of type-checks.)

Though after pondering a bit I realized that it indeed seems impossible
to compile "(.bar foo)" (could result from "foo[.bar]" via SRFI-105)
into the correct memory offset, if there are multiple record types each
with a '.bar' field, because it's not statically known which record type
'foo' has.  Maybe that's exactly what you meant.

Taylan

Reply via email to