3 ms·
> some constant strings containing css breakpoints as the type 'string | int' yeah this really is the fundamental problem with TypeScript advocates. They seem
by deckard1 6y ago
> some constant strings containing css breakpoints as the type 'string | int'
yeah this really is the fundamental problem with TypeScript advocates. They seem to come in two different breeds: A) people that would rather be doing Haskell but are forced to use JavaScript because that's where the jobs are and see nothing at all wrong with type inference and error messages that are 10 lines long and completely indecipherable by actual humans, and B) people that have never used a language that isn't JavaScript and have no clue how to structure type interfaces within an actual system (you end up with partial/omit and optional fields every-fucking-where and no rhyme or reason behind anything).
For some stupid reason this entire industry seems to suddenly believe that a 40+ year old debate of static vs. dynamic typing was settled because Microsoft came out with TypeScript.
- spion 6y agoThis really isn't true, and TypeScript is fundamentally different from most other typed languages (except perhaps for typed Scheme / typed Racket) and as such is often used in different ways. You should look into the differences.