logoalt Hacker News

edflsafoiewq • yesterday at 9:47 PM • 1 reply • view on HN

How?


Replies

horseloverthin • yesterday at 9:53 PM

A good way to think about contracts and related features as they relate to memory safety is from the compilers perspective; pretty much any feature that gives the compiler additional information about a users intent for a scope allows the compiler to have to infer less, and thus have more ability to provide 'safety' guarantees.

The most trivial example of this is a check that a caller has provided non-null inputs ( hence allowing 'safe' unchecked access in most cases)

➕ show 1 reply