@jonn don't really see the point of types alone without actual code.

The util library I'm making for our new framework (of course I'm making a new framework) is based around type inference wherever possible.

And type inference for pipe() took several attempts and like a week of work in total. And still needs kludges for overloaded functions. And isn't properly variadic either.

Follow

@virtulis I'm currently using a language that doesn't have inference to unique type.

everything that's
LessThan<5>
is also
LessThan<6>

in general, once I started using dependent types, it's genuinely hard for me to understand "code vs types" dichotomy.

Dependent parsing for instance is really cool! It allows to make a record Num<x : String> which carries some number n and something of type "parse(x) = n".

When I look at projects like hotscript, I kinda hope that I'll be able →

@jonn I wondered how the author does number comparison in TS and yeah that certainly is quite creative 😅 github.com/gvergnaud/hotscript

My types are much more boring for sure. But now I feel a bit less bad about my pipe() signature.

Sign in to participate in the conversation
Doma Social

Mastodon server of https://doma.dev.