Compiler Reminders
jfmengels.net
Compiler Reminders
1–7 of 7 posts
Re: Compiler Reminders
#2Re: Compiler Reminders
#3Best buds on this front
Re: Compiler Reminders
#4Re: Compiler Reminders
#5Exhaustive compile time checking of dispatch statements is a wonderful thing, sorely missing from the languages that decided "sum types" are a bit weird and niche.
I can pass a Reader interface to your function, but I cannot (easily) add a
> | UnusualProtocol(Socket)
as a third party consumer.
Other than that, sum types are the better abstraction. With exhaustive first class pattern matching (eg. with proper matching on destructuring), nothing comes close in terms of ergonomics.
Re: Compiler Reminders
#6Exhaustive compile time checking of dispatch statements is a wonderful thing, sorely missing from the languages that decided "sum types" are a bit weird and niche.
They make it near impossible to extend from the outside. I can pass a Reader interface to your function, but I cannot (easily) add a > | UnusualProtocol(Socket) as a third party consumer. Other than that, sum types are the better abstraction. With exhaustive first class pattern matching (eg. with proper matching on destructuring), nothing comes close in terms of ergonomics.
Re: Compiler Reminders
#7Exhaustive compile time checking of dispatch statements is a wonderful thing, sorely missing from the languages that decided "sum types" are a bit weird and niche.
They make it near impossible to extend from the outside. I can pass a Reader interface to your function, but I cannot (easily) add a > | UnusualProtocol(Socket) as a third party consumer. Other than that, sum types are the better abstraction. With exhaustive first class pattern matching (eg. with proper matching on destructuring), nothing comes close in terms of ergonomics.