Comment

Comment by kortex

Pattern matching and Result type are truly among the most revolutionary computer science constructions and I am glad to see their adoption starting to catch on. So much nicer to work with than exception handling or endless propagating of error constants a la Go. Python just got pattern matching (although it lacks pattern-match assignment a la Rust), now it just needs an actual Result type in the stdlib instead of Optional[T] which is really just T|None rather than an actual container. Golang can start delving into Return-type-looking generics but I suspect pattern matching is a long ways out.
parent kortex 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton