Re:Show HN: Decaffeinate converts CoffeeScript projects to m...
by theprotocol on Monday June 19, 2017 @05:28AM
(#14585602)
Fortunately, ES6 and 7 are very pleasant to work with. And say what you will about Facebook as a company, but their tech side tends to favor lean technologies over bloated ones, e.g. React over Angular (don't get me started on Angular!). I would pursue that path if I were you.
[ Parent
| on HN ]
Re:Show HN: Decaffeinate converts CoffeeScript projects to m...
by tomelders on Monday June 19, 2017 @05:32AM
(#14585628)
I think the difference comes from the fact that Facebook makes things for the web. Their technologies are born out of necessity. Typescript feels like an academic exercise, created by someone who doesn't like Javascript (and there are good reasons to not like Javascript), and wants to reshape it to there tastes, but in the abstract, outside the context of real word usage.
And Angular feels more like a land grab than a useful tool to me.
Re:Show HN: Decaffeinate converts CoffeeScript projects to m...
by Klathmon on Monday June 19, 2017 @07:24AM
(#14586054)
If you haven't used it, Flow is a fantastic alternative to TypeScript. They still have some hiccups about working correctly on windows, but it's a much easier way of doing typing in JS than TS.
Re:Show HN: Decaffeinate converts CoffeeScript projects to m...
by tomelders on Monday June 19, 2017 @09:51AM
(#14586904)
I've tried flow too. I've got an article on the boil that walks through creating a production ready SPA with Babel, Typescript, and Flow. Covering the whole stack including Webpack, unit tests, and integrating Typescript with Babel (which is still a must as far as I'm concerned).
If I got to make a choice, I'd use tern.
Re:Show HN: Decaffeinate converts CoffeeScript projects to m...
by jeremyjh on Monday June 19, 2017 @09:43AM
(#14586841)
Except it is impossible to prevent it from typechecking node_modules; so if you have a dependency that was checked with a different version of flow than you are using, you may see errors that are impossible to silence.
Re:Show HN: Decaffeinate converts CoffeeScript projects to m...
by insin on Monday June 19, 2017 @10:45AM
(#14587346)
The only way I've been able to get Flow to be usable on my low-specced laptop is to tell it to [ignore] node_modules/.* and add a file to both [ignore] and [libs] which has one of these for each of my dependencies:
declare module 'npm-module-name' { declare var exports: any; }
I needed similar for TypeScript when trying to use noImplicitAny: false - adding "typeRoots": ["node_modules/@types"] in compilerOptions and a d.ts file with the following listed in "files": declare module "*"
Typechecking third-party dependencies seems to be a bit of a crapshoot if you're not in a part of the module ecosystem where the tool you're using is either quasi-required, popular or has module authors using the same tool and shipping type definitions themselves. I've had contributed type definitions in both Flow and TypeScript "break" working, tested code.
Re:Show HN: Decaffeinate converts CoffeeScript projects to m...
by jeremyjh on Monday June 19, 2017 @08:35PM
(#14591434)
Typescript is different - I can use type definitions from NPM without typechecking dependencies I don't import.
Re:Show HN: Decaffeinate converts CoffeeScript projects to m...
by ENGNR on Monday June 19, 2017 @06:28AM
(#14585825)
Angular initially solved a very small problem - forms. It just scaled really badly (by design but then it was never highlighted in the documentation) and then had second system syndrome