3 ms·
I'm a developer with 15+ yrs of experience in the web, and I'm definitely not smart enough to understand TypeScript. It seems like only 9000 IQ geniuses can be
by amackera 6y ago
I'm a developer with 15+ yrs of experience in the web, and I'm definitely not smart enough to understand TypeScript. It seems like only 9000 IQ geniuses can be productive in it, especially if you're starting a project from scratch.
Coming from a C/C++ background originally, quite frankly I don't see the supposed benefits of static typing, and in fact I'm intimately familiar with how type systems can be abused to terrible effect (on code quality and developer morale). IDE support is great until your IDE is a bloated mess (Jetbrains, Visual Studio, etc.).
I have recently picked up ClojureScript and it's a lot easier to understand than TS and incredibly productive to use in real life. No static typing in sight. Just my own little field report, I don't expect to convince any hard-core TS fans out there to switch. Do what feels right!
- JamesBarney 6y agoWhat part of typescript requires a 9000 iq to understand? Some of the special types are tricky and make my head hurt but most people will just consume them through autocomplete. The only thing I miss from transitioning our frontend from React to Blazor is the typescript type system which I always thought was a joy.
- lukifer 6y agoFunny, I have the reverse feeling, where Typescript is (mostly) intuitive; whereas I admire Clojure and want to love it, but it keeps bouncing off my C-infused brain. I have definitely seen type definitions tortured within an inch of their life, especially in third-party libraries, with multiple layers of generics and utility types and unions until it does take a 9000 IQ to parse them (or worse, figure out why a given data structure is throwing a type error). While I've come to enjoy the "safety net" and autocompletion of strong types, I've discovered what I really want is meta-programming guard-rails. For instance, while I can define `type Foo = 1 | 2 | 3`, I'd like to be able to do something like `type Foo: number = x => x > 0 && x < 4`, with arbitrary meta-logic that be checked at build time, no differently than preventing coercing a string to a number. The full scope of what I want is probably NP-hard (`1 | 2 | 3` does not actually prevent `foo += 3`!), in addition to the constraints of the JS compile target, but I can dream. :)
- amackera 6y agoI totally understand the fascination with type systems. It's just that in my experience, the people are have the most success with intricate type systems are much smarter than I am ¯\_(ツ)_/¯
- codecurve 6y agoAs someone who has written tens of thousands of lines across both ClojureScript and TypeScript, this baffles me. I can definitely understand why someone would prefer CLJS, but it has a way higher barrier to entry than TS. If you're smart enough for Clojure then you're smart enough for TypeScript. That doesn't mean you have to like it though, but you don't have to hide that distaste behind incendiary exaggerations about TypeScript only being suitable for superhuman geniuses. The overwhelming evidence is that TS is popular _because_ it is a safer and easy-to-understand alternative to JS.
- amackera 6y agoI was exaggerating; however, I also learned TS and CLJS at the same time and walked away utterly confused with TS and absolutely loving CLJS. I'm a solo dev-- TS probably gets a lot more useful when there's a team of people working together. That would justify the barrier of entry, which was too high for me.