News for hackers. Stuff that matters.
Re:Show HN: Python library for functional programming by masklinn on Thursday December 14, 2017 @03:52AM (#15920841)
Sum types make very little sense in dynamically typed languages even with good manipulation of user-defined values. For instance Erlang does not have "formal" sum types, it wouldn't really bring anything useful to the table, the compiler does not typecheck by default (so the sum type would just be a complication with no benefits) and Dialyzer can simulate them by using type/value unions e.g.

    {ok, integer()} | {err, string()}
Re:Show HN: Python library for functional programming by catnaroek on Thursday December 14, 2017 @11:21AM (#15923467)
While I agree that there would be no point to user-defined sum types, constructor classes would be a strict improvement over what Erlang has.