4 ms·
This looks interesting. I've been wanting to mess about with TypeScript, but had only gone so far as scanning through the tutorials/intros. Nice to have a sandb
by Nicksil 10y ago
This looks interesting. I've been wanting to mess about with TypeScript, but had only gone so far as scanning through the tutorials/intros. Nice to have a sandbox setup from the start.
Also, really enjoying your "Flocking" script. Well done.
- beaconstudios 10y agoI use TypeScript in my startup - it's great and provides a lot more code stability over raw JavaScript but as you build up your type definitions you will likely hit a "roof" where TS doesn't support the next feature you would logically want. There's also no reflection on interfaces (as they're a purely compile-time construct like C macros) which sucks if you want no-noise DI. But overall it's really awesome and getting better with every release.
- faceyspacey 10y agoWhat do you mean by "the next feature you would logically want"?
- beaconstudios 10y agowell in my experience, and this has happened a few times with different requirements which is why I was generic, what happens is you try to use more and more of TypeScript's features to get strict typing (keyof, mapped types, discriminated unions etc) and they work great for 80% of cases. Then you push the feature too far and it falls down. For example, I managed to get tsc to hit a "stack depth exceeded" error by adding a minor variation on an existing complex type that I'd created. I find with TS types, less is very often more unfortunately. I'm trying to use TS like Haskell and it just doesn't play ball.
- spion 10y agoYes, TS does have limits. Its still very expressive compared to most mainstream type systems.