Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
ptman
· 6mo ago · 0 comments
So what happens when you write through the nil pointer?
Comments
[–]
Lvl999Noob
6mo ago
Well, what happens when you write through an invalid pointer? The runtime can swallow the write or crash the program or allocate new storage and replace the pointer. Depends on the wanted semantics.
[–]
chuckadams
6mo ago
Nil of course (nothing happens). Not saying it’s a
good
idea, it would just be consistent.