logoalt Hacker News

nullpwryesterday at 12:50 PM1 replyview on HN

> The language should not let you create an an invalid pointer, or at least warn you when you are doing so

completely agree!


Replies

casey2today at 12:08 AM

That's a nonsensical statement, a language cannot warn you, only a compiler can (-Wcast-align). The compiler can also decide what is and isn't an invalid pointer, this way the language avoids leaky abstractions.