News for hackers. Stuff that matters.
Re:Single Page Applications using Rust by uryga on Wednesday August 12, 2020 @06:36AM (#24130476)
> "Either types aren't true sum types because Either<A, B> isn't the same type as Either<B, A>."

that's such a weird argument! did he also complain that tuples aren't true product types because (A, B) isn't the same as (B, A) ? why would they be the same, and not just isomorphic?

Re:Single Page Applications using Rust by ragnese on Wednesday August 12, 2020 @07:45AM (#24131018)
I haven't watched the talk recently, but my feeling at the time was that he was just being pedantic about the definition of a sum type. Kotlin's nullable types would be example of true sum types because they are symmetric. But you can only make a sum of `T + null` and not a more generic `T + U`.

His real point, I believe, was that the `Either` implementations weren't as good as true sum types because of ergonomics. It's part of his philosophy/bias that type systems get in the way and therefore cause more harm than good.

I don't really grok his point most of the time. It just feels foreign to me to not want as strong a type system as possible. But a lot of really smart guys feel that way: Him, Alan Kay, etc. I suspect that they're able to track much more stuff in their heads at a time than I am.