3 ms·
Errr, you wouldn't do crazy stuff like that in C# or Java, so no, this isn't a good example. It's just you doing something stupid thinking you were being cleve
by mattmanser 7y ago
Errr, you wouldn't do crazy stuff like that in C# or Java, so no, this isn't a good example.
It's just you doing something stupid thinking you were being clever, as we all have.
- sethc2 7y agoYeah the stuff I was doing was more to see how crazy of things we could do with the type system. Like I said just fun. But probably a waste of time other than the learning. Just a warning that is tempting to do crazy (but stupid) things. One kind of weird thing we did, was we had these JSON Schema definitions that were const, so all the strings like "type" were of a literal string type. Then using recursive type definitions, and the `extends` key word we were able to extract the actual shape of the data into a type. Not exactly that useful, compared to typing it out, but it was still kind of cool.
- dfee 7y agoThis is interesting to me. How did you decide that you were over investing in types?