These are chat archives for jdubray/sam

Jun 2017
Antanas A.
Jun 12 2017 15:22
Hi, I've seen a talk about TypeScript and don't get why JavaScript programmers don't like TypeScript as TypeScript fully supports all JavaScript semantics, and why is better to annotate types in jsdoc blocks instead to annotate it inside a language?
Also there is an "noImplicitAny" and "strict" flags to enforce full type checking if there is a need
Can't find any reason to skip type information from the system entirely, does it makes development faster?
Or there is a feeling myth that TypeScript is somehow related to OOP? (the compiler itself is written without any classes)
devin ivy
Jun 12 2017 15:29
@antanas-arvasevicius a lot of javascript developers do like typescript!!
one of the main downsides, i think, is that type definitions are often out of date, even for widely used libraries.
and it's not necessarily the job of library authors to keep those up to date, i.e. if they don't use typescript. so the onus is on the TS community to keep library defs up to date.
that said, that's not necessarily a good enough reason to spurn TS entirely. i think it's :ok: overall :)
Daniel Neveux
Jun 12 2017 15:35

for my part I love TS for:
1- the hours (days) of debugging it saves to me as 90% of my errors are related to undefined var, etc...
2- the IDE integration (code completion and jumpTo)
3- the flexibility to choose from no typed at all to strongly typed.

I don't code without it any more.

(I learnt Java at first, so I may be biaised)
devin ivy
Jun 12 2017 15:35
Antanas A.
Jun 12 2017 17:20
I also love TypeScript, I've been using it after it's first beta releases and see no downsides of using it. Current versions is cutting edge they allow mix .js/.ts interchangeably in a single project type definitions goes into npm '@types/' packages, and if type def is out of date then declare it as any and get back to javascript world:-)
Could anyone give me a pros of plain JavaScript versus TypeScript? Where plain JavaScript could benefit?
devin ivy
Jun 12 2017 17:29
plain js? it's good for teams who already know js and need to stay productive without learning new fundamentals! TS takes learning and introduces a build step, which not every team/project is prepared for.
on the front-end there typically already is a build step. but in nodejs, perhaps not.
Zach Dahl
Jun 12 2017 21:56
typescripts benefit is autocomplete. that is all
and tern.js adds pretty good completion to plain ole js anyway