Y
Hacker News
new
|
ask
|
show
|
jobs
by
ptman
34 days ago
So what happens when you write through the nil pointer?
2 comments
Lvl999Noob
33 days 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.
link
chuckadams
34 days ago
Nil of course (nothing happens). Not saying it’s a
good
idea, it would just be consistent.
link