Hacker News new | ask | show | jobs
by aredox 870 days ago
"where in memory the pointer is allowed to access when." - ... when what?

Sorry, this sentence is difficult to understand.

2 comments

‘when’ here meaning “and under what circumstances”. An ‘and’ might help
Probably just a mistake. I just would assume that the word "when" is superfluous and respond in a way that allows the asker to correct their mistake but not invest too much in an answer because the assumption might be wrong.

I am picky in language as well, so I understand where you are coming from. But I discovered that LLMs often answered anyway when my question was incomplete or contained mistakes and they got it correct not too rarely.

It's a useful trick I discovered late in my life (I am in my fifties). I started to use it with my children and my wife. Their utterances are often not mathematically and linguistically perfect, but very human and lovely. When I got stumped I just thought about what they might have asked and answered that. More often than not they were happy with my answer.

It’s just a multiple wh construction as in

    Who arrived when?
which you might answer with e.g. “John on Tuesday and Mary on Wednesday”. This one is a bit harder to parse because it’s longer, but the answers will be something like “it can access region A at time T, region B at time T’, …”
Right, in particular objects (in the general sense, not the OOP sense) have lifetimes and so the provenance of a pointer to or into that object is restricted to the lifetime.

If I make a Box<Goose> some heap is allocated and my Goose is in there, and I can get myself a pointer to that Goose, but the pointer must not be used either before I made the Box<Goose> or after it's dropped.

Thanks!I really couldn't recognise it was this construction here!