Simon

Results 73 comments of Simon

Yes I explored it as well. It is awesome :) However I would prefer to have one solution for both tagged unions and for general case matching. Number, String, Void...

1) value being checked comes at the last line (...)(props). As opposed to swift, F#, js switch, resonML etc. It breaks my mental model at least. 2) Seems weird to...

To be honest this is probably the most critical > We already discussed performance for Record matching. And I know that unionize solves that. Although I have to commit to...

> In Haskell this is all that multi-arg functions ever do I'm all in for curried version. It is the flow of reading that throws me off (order of args)....

> AFAIK there's no easy way to do the opposite, i.e. generate runtypes from static types, short of getting involved with compiler plugins or some form of code generation. Usually...

> That said, while correctness and simplicity and expressivity of the API are my top concerns, I'm definitely interested in fixing any pathological perf issues. I work on a react-native...

> Note that in the second overload I think we'd need to use a tuple of cases to disambiguate at runtime from the first overload. I think a diff name...

> Isn't that the same as what I was proposing with It is exactly this. I wanted to have a live example for this syntax. > What do you mean...

>So, leaving aside the question of the builder syntax for the moment, this allows specifying the cases to the match method in any order (is this what you meant by...

Just wanted to share with you a snippet of prototype I built ( to demo the builder pattern) ```typescript import { Number, String } from 'runtypes'; const enum MatchType {...