News for hackers. Stuff that matters.
Re:It’s strange what people put up with in C# by Smaug123 on Saturday August 15, 2020 @07:55AM (#24168221)
F# solves this by making it a compile error to fail to consume an expression that returns anything other than unit. If you really must do this, you normally use `ignore : 'a -> unit`. It's unidiomatic F# to structure your APIs in such a way that you will routinely throw away the information you're given.
Re:It’s strange what people put up with in C# by Gibbon1 on Saturday August 15, 2020 @10:22PM (#24174318)
I think really what people want are strict and sleazy compile options. Or better the ability to tell the compiler that a return value is an error. Or not. If it's not an error and it gets tossed who cares really. Sometimes you don't care if every i is dotted and every t crossed.