[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: opaque type proposal
Date: Sat, 4 Jun 88 00:20:23 edt
From: Juan Loaiza <firstname.lastname@example.org>
You still need the length check in order to make sure that the slot containing
the ``tag'' object actually exists before trying to fetch its value.
Think again about the trick I mentioned. It is a dirty, underhanded,
shameful, slimy trick; but I think it works. If a token for a type T
is only ever present in the N'th slot of an object of type T, then
looking at the N'th slot of any other object will never get you that
token. It does not matter how many slots the other object has. If it
has less than N slots you, will get a random slot out of another
object, but never the N'th slot (assuming no objects have zero
For our young listeners out there, please don't try this trick at home.
Some care is needed near the end of memory, to make sure that the start of
the last object is as far from the end of the legitimate address space as
the greatest distance of any tag from the origin of its object. Ugh,
bletch. Also, having any kind of "raw array" representation could screw
things up. Otherwise, it's a great, wonderful, slimy crock.