Post B1ZZgi5PHlpNa2aJSi by harold@mastodon.gamedev.place
 (DIR) More posts by harold@mastodon.gamedev.place
 (DIR) Post #B1ZZgi5PHlpNa2aJSi by harold@mastodon.gamedev.place
       2025-12-24T11:42:13Z
       
       0 likes, 0 repeats
       
       I understand some languages' disapproval of implicit narrowing conversions, but if I write `num >> 24` there is really no issue here, especially not:"note: unsigned 8-bit int cannot represent all possible unsigned 32-bit values"I get it, it's annoying to have to nail down a KnownBits analysis pass to such a degree that you can add it to a language specification without it being unpredictable and unreliable. But can you give me *something*, for ergonomics?
       
 (DIR) Post #B1ZZgkGTBbriKvmAz2 by harold@mastodon.gamedev.place
       2025-12-24T11:49:53Z
       
       0 likes, 0 repeats
       
       The error message explicitly mentioning values is more of a misdirection than if it only mentioned type-incompatibility
       
 (DIR) Post #B1ZZglQmqjiDxDbvhg by wolf480pl@mstdn.io
       2025-12-24T11:59:51Z
       
       0 likes, 0 repeats
       
       @harold I think it showcases which part the compiler does not understand...though that's useful when you want to improve the compiler, not when you want your program to compile :/