News for hackers. Stuff that matters.
Re:100 days with Rust: a series of brick walls by Yoric on Friday March 23, 2018 @01:34PM (#16660558)
> Enums are super nice, but it's very annoying that you cannot just use the value as a type. My project had a lot of enums (user-provided query trees), and it was causing a lot of friction.

Note that OCaml has this feature of using-a-enum-value-as-a-type (or using a subset of enum values as a type, etc.). It works very well, but it quickly produces impossibly complicated error messages.

I'd like Rust to have this feature, eventually, but not before there is a good story for error messages.

Re:100 days with Rust: a series of brick walls by arghwhat on Friday March 23, 2018 @06:03PM (#16662972)
I am not very familiar with OCaml, but why would such a feature result in complicated error messages? I can only really imagine two new error scenarios: "Expected Enum::ValueA, got Enum" and "Expected Enum::ValueA, got Enum::ValueB".
Re:100 days with Rust: a series of brick walls by GolDDranks on Sunday March 25, 2018 @02:37AM (#16671069)
I’m interested in this feature because of the ”incremental” static case analysis it enables. What’s the problem with the error messages?