News for hackers. Stuff that matters.
Re:How UTF-8 Works by mekster on Wednesday February 09, 2022 @12:14AM (#30269125)
> "your code compiles" is much closer to "your code is correct".

That is so far from the truth.

Re:How UTF-8 Works by ben-schaaf on Wednesday February 09, 2022 @01:05AM (#30269481)
How is it anything but the truth? The express purpose of static analysis, like a type system, is to catch bugs before running your code. That pretty clearly means that code that successfully compiles is closer to being correct than code that doesn't.
Re:How UTF-8 Works by mekster on Wednesday February 09, 2022 @01:13AM (#30269528)
I mean, correct as in logically correct and that's just a different matter than being grammatically correct.
Re:How UTF-8 Works by morelisp on Wednesday February 09, 2022 @12:01PM (#30274980)
The parser assures your code is grammatically correct; the type system assures your code is semantically consistent, which is usually a much stronger guarantee, and by most practical measures will be closer - often much closer, and for total functions on total types, sometimes all the way - to "logically correct".