News for hackers. Stuff that matters.
Re:The type system is a programmer's best friend by treis on Saturday November 05, 2022 @09:40AM (#33481370)
The problem with this is the explosion of types when you start with combinations. Stuff like VerifiedEmailOptedOutOfMarketing.

I can see a type system designed from the ground up to do something like this. But as a bolt on to existing languages it's pretty clunky.

Re:The type system is a programmer's best friend by throway232lasdf on Saturday November 05, 2022 @10:56AM (#33482062)

    type VerifiedEmailOptedOutOfMarketing = { email: string; is_verified: true; is_opted_out: true; };