pointer/integer type distinction
Nathan Hawkins
utsl@one.net
Sat, 13 Apr 1996 10:11:53 -0400 (EDT)
I'm having problems with how to separate pointers and integers. Some
questions:
1. Should there be completely separate operators for integers and pointers?
2. Should it be possible to add integers to pointers, etc.?
3. What should happen if someone uses an integer-only operator on a pointer?
4. What is the best way to implement this so that a minimum number of
instructions/cycles are needed to do all this?
Questions 1 and 4 are closely related, since "smart" operators would be
expensive.
One possible answer to question 3 would be to implement exception handling
in the LLL. Something like the ANS Forth "THROW" might be appropriate.
For GC to work, the answer to question 2 would seem to be "very limited".
But there would need to be a fairly complete set of operators to access
data through a pointer. Limitations here should be done very carefully.
Opinions, anyone?
*utsl*