News for hackers. Stuff that matters.
Re:Bottom Type in F# by genneth on Wednesday September 23, 2020 @08:09AM (#24566017)
Compiler error if these are ever instantiated/need to be monomorphised? The problem is that this is very unrustic by having the error be very non local.

But maybe this is unavoidable once you have sufficiently complex const fn anyway...

Re:Bottom Type in F# by DougBTX on Wednesday September 23, 2020 @08:45AM (#24566324)
There's a principle in Rust that only the function signature is needed to know if a function call is valid, without any need to look at the function body.

It makes things much easier to think about: at a minimum, if you change the body of a function it doesn't affect whether other code compiles or not. It's also one of the big differences between generic parameters (all in the function signature) and template metaprogramming (templates can do duck typing).