logoalt Hacker News

viraptor • yesterday at 6:37 PM • 1 reply • view on HN

Any hardware access is always going to be unsafe, because the compiler cannot know what the hardware does. For all it knows, it could change the memory of the running app. There's no implementation that cares about ownership where that goes away.


Replies

markhermeling • yesterday at 7:30 PM

I was specifically thinking about register access. That you can make safe if you provide a way to describe what the hardware needs.

Something like this: https://en.wikibooks.org/wiki/Ada_Programming/Representation...

➕ show 1 reply