bye...

Richard A. O'Keefe ok at cs.otago.ac.nz
Tue Mar 11 21:56:50 UTC 2003


Roel Wuyts <roel.wuyts at iam.unibe.ch> wrote:
	Let me rephrase:  I was talking about OO static typing systems.
	Type systems for OO systems I know of are now looking more into
	typing generics, but are not quite there yet (in my opinion).
	Do you have some pointers to a complete OO language that has no
	typecasts?

Well, much depends on what you think a typecast is.
Does Eiffel's "conditional assignment" count?
In Eiffel,
	lhs ?= rhs
has the effect that if the run-time type of rhs is compatible with the
compile-time type of lhs, then the value of rhs is assigned to lhs,
otherwise lhs becomes a Void reference.  Note that this cannot be used
to subvert the type system; Eiffel has no features for that.  The value
of lhs is _always_ appropriate for its declared type.

	but extended records are not enough; they don't provide 
	you full objects I thought. Do they have late binding of self? I 
	thought they only provided a form of data sharing.

I have no idea what you mean by data sharing, and I did not write
"extenDED records" but "extenSIBLE records".  More precisely, a value
of one record type conforms to another record type if each of the
fields in the second type appears in the first and the corresponding
field types match up right.  Of course self is late bound, why wouldn't
it be?  Do read the O'CAML manual.  I don't really like O'CAML syntax
much (it's several functional language design generations out of date),
but it's a powerful system and regularly wins speed races for compiled code.



More information about the Squeak-dev mailing list