News for hackers. Stuff that matters.
Re:The Neat Programming Language by JonChesterfield on Monday December 25, 2023 @05:20PM (#38766739)
What do you mean by implicit conversion in the context of sum types? I don't see it under https://neat-lang.github.io/manual.html#types
Re:The Neat Programming Language by FeepingCreature on Monday December 25, 2023 @05:29PM (#38766829)
Oh yeah I didn't actually write this down in the manual: if you expect `(A | B)`, then both A and B implicitly convert to that type.
Re:The Neat Programming Language by JonChesterfield on Monday December 25, 2023 @05:53PM (#38767069)
Type A|B is implicitly constructible from A or from B sounds reasonable. A|A from A presumably an error, or possibly A|A itself is an error. Thanks