Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Phlisg25247yPlus actually make sure the types are definitely optional, in case of confusion or lazyness
-
plusgut60377yI write js for more than a decade, I believe that I write good JavaScript. But typescript is a blessing and helps me in my daily work.
Staticly typing gives me errors at compiletime and not just at runtime, that's awesome.
And it has the beautiful possibility to make a good autocompletion. -
Good luck with self = this-ing. Why the hell would you want that. TS and ES6/7 has so much benefits and makes your code a lot more readable and clean. Plus arrow functions ftw. Compiling is just a necessity for a broader support than Chrome.
-
jsmrcaga7847yI see that this rant was not liked by some of you, sorry for that. It's just that I love JS because of it being interpreted and not compiled.
However:
- arrow functions are JS native
- with arrow functions we have lexical this (no more self=this)
- async/await native
- promises native -
You still need transpiling for the stuff you mention. ES6 and especially ES7 have a very low browser support at the time.
-
plusgut60377y@jsmrcaga don't be sorry, that other people (like me) disagree ;)
You have a valid point, the roundtrip with your buildchain takes a little more time when you have to transpile it.
But I believe that typescript solves the main problem that js has. In my opinion the most broken thing about js is the dynamic typing.
And don't get me wrong, I love native JavaScript, but In my opionion TypeScript adds a lot of benefits.
"I'm too freaking lazy to learn to write good JavaScript so I'm gonna build a top-language with types, and then a compiler so it transpiles TypeScript to JavaScript and runs my app on the interpreted language it was at first. I'm gonna save so much time" - 2017 people
rant
javascript
typescript