4 ms·
Maybe it is just me but Javascript is not my favourite dynamic language. Given project like ReasonML and other languages that have type inference prototyping is
by StreamBright 8y ago
Maybe it is just me but Javascript is not my favourite dynamic language. Given project like ReasonML and other languages that have type inference prototyping is not harder than without types. Is it a valid argument that it slows you down? Not sure.
- k__ 8y agoSeems like he prefers TypeScript because it's a super set of JavaScript. He also mentions he only knew MS made it, but not who specifically, which lets his choice sound more profound.
- sebringj 8y agoI was not happy having to do TypeScript on a project thinking in your point about slowing you down which initially is completely true if you are forced to tslint it to hell. However, I've done a 180 in that TypeScript is very nice when you relax the tslinter and you sprinkle it on as you go which gives you that extra feeling of being auto-guarded when its just more practical but without getting in your way which is exactly what Ryan was saying in his Deno approach. I've saved loads of run-time errors from VSCode knowing types ahead of time for example.
- acemarke 8y agoCould you summarize what settings you used for the TS compiler and tslint for that "sprinkle it on but keep it out of the way" approach?
- sebringj 8y agoBasically you turn off as many settings as possible that make things impractical. Its more of how you work, not a catch-all. I have VSCode and installed a supporting library to work with it. Basically it tells me what's wrong and how to disabled it as well. I either inline disable it or go to the specific tslint rule and disable globally. It is most difficult when you have to use another person's biolerplate that was built without typescript AND tslint is turned all the way up.
- machiaweliczny 8y agoTo have nice prototyping & development I use it more like typechecker than compiler. I set "transpileOnly" for tsc loader and set different more strict command like "npm typecheck" to "tsc --no-emit ./src/index.ts". I usually add only strict null checks and it's enough for me. I also disable most of tslint as it's way too heavy in standard CRA app for example. This way you get hints from tsc in editor so you see what is wrong but at the same time you can run your app without fixing everything upfront.
- gameswithgo 8y agoat least some research into types and productivity showed that the highest productivity was when function signatures have to have types but type inference exists inside functions (like auto in c++, var in C#)