logoalt Hacker News

cowlevel • today at 6:39 AM • 0 replies • view on HN

Somewhere you have a null and somewhere you want to call a function on it (by mistake). Whether you call it through the pointer or convert the pointer to a reference and then call it through the reference makes no difference, the program still has UB. You can't even argue that the UB occurs at a different point in the program - that makes no difference because UB is allowed to time-travel.

Didn't they say they use references when the pointer/reference should be invisible?