11

"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

Comments
  • 1
    Plus actually make sure the types are definitely optional, in case of confusion or lazyness
  • 2
    I 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.
  • 1
    I’m too lazy to learn to write good JavaScript, so I use jQuery instead.
  • 0
    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.
  • 1
    I 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
  • 0
    You still need transpiling for the stuff you mention. ES6 and especially ES7 have a very low browser support at the time.
  • 1
    @JohnDoesNot oh sorry, did not see browser. Indeed you are right sir.
  • 0
    But i feel what you are saying, runtime is nice ;)
  • 0
    @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.
Add Comment