-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tagged Pointer: Nil == 0? #51
Comments
Well I've tried to mine my memory and notes for some clever reason I ordered the tags this way but I can't find anything 😄 Seems like a hole in the logic. I'll fix this shortly, unless you are interested in submitting a PR? |
I'm not sure what your preferred solution to this problem would be, but I've seen at least couple from things I've looked into:
I'm sure that there are a multitude of other options |
The most obvious option to me is to reassign tags such that I've considered option 1 to be a possible solution for keyword symbols in general. It would be a somewhat more involved solution, though there is already the |
Yup, looks like a good solution to me! |
First of all, great work on the book, I've been really enjoying reading through it!
I noticed that the implementation of TaggedPtr represents nil as a pointer with a tag of
0
. I've also noticed that integers are represented with a tag of0
.Would this not make a literal
0
be equal to nil, and mean that a zero integer would always be converted to a nil FatPtr (due to this code here )? Not sure if this is an intentional part of the design or not :)The text was updated successfully, but these errors were encountered: