DEV Community

Discussion on: What bad habit do you have because you learned an approach *before* a better idea came along?

Collapse
 
jvarness profile image
Jake Varness

I try to avoid TypeScript. Much bigger fan of JavaScript

Collapse
 
ben profile image
Ben Halpern • Edited

Same here... for now. I wonder if TS will become the de facto standard in the future.

(Actually I wouldn't say I'm a much bigger fan. My reasons are probably more out of apathy. I wouldn't reject TypeScript per se.

Collapse
 
teekay profile image
TK

As a person who started coding with Python, Javascript, Clojure, and Ruby (and was frustrated with C++), I always liked dynamically typed languages. After learning Haskell and now that I'm using Typescript I can say that I should have learned Typescript earlier. It's so powerful and I feel safer and in a environment with better-documented code.

I still like doing some scripts with Python or playing around with Lisps, but if I'm starting a new project (website or dev tools), I tend to use Typescript.

Thread Thread
 
jvarness profile image
Jake Varness

Don't get me wrong, type safety is really convenient when you start talking about larger systems with more complex business requirements.

For websites, I'm still more likely to reach for JavaScript. Call me a fuddy-duddy but I feel more productive. Between Jasmine/Mocha tests and ESLint I feel pretty confident most of the time.

Collapse
 
jvarness profile image
Jake Varness

It's really hard to call onself a fan of JavaScript because of how convoluted it can be, but I just kind of feel like things are super easy to accomplish in JS.

This is also coming from someone who doesn't know Ruby or Python very well lol.

Collapse
 
perpetual_education profile image
perpetual . education

Typescript is JavaScript - isn't it? It's a super set, right? Any regular Javascript is valid TypeScript, syntactically.

Collapse
 
jvarness profile image
Jake Varness

Sort of. An example is that you can't use regular expressions the same way. I'm turnt that you have to construct a new Regex in order to use a regex.

The typing system doesn't feel very strong to me either. It feels much more like duck typing than actual type safety to me, but this is also coming from someone who has a pretty extensive career using Java.

I get that for certain things there's compile-time checking that can help you not make mistakes, but I'm still failing to justify the time you gave to spend accounting for those things while also remaining productive.