by DanRosenwasser on 9/27/18, 3:00 PM with 62 comments
by monkmartinez on 9/27/18, 5:09 PM
I am super frustrated with lack of screens for python. I don't want to pigeon hole into an ecosystem where I am limited to a certain platform like Java/Kotlin or even (dare I say) Swift (no real web, still need JS). As a single developer, mostly hobby, I want options for all the things!!!
I have been migrating my Python scraping to JavaScript with node, puppeteer, and it has been quite illuminating, and the speed is ridiculously better. Furthermore, I can easily turn my scrape into a desktop app with electron with an api that is consumed by a mobile app with react-native. Long story short, I can now think about making some of my Python ideas into cross platform desktop apps with mobile versions as well. Not super easy with Python.
The question is would TypeScript be even better for a long term bet?
by the_other_guy on 9/27/18, 5:05 PM
by erokar on 9/27/18, 5:41 PM
Sure, TS gives you a little bit better autocompletion in VS Code, you can document your function signatures a little bit better and you can catch a few trivial type errors — but it also has some costs: Extra set up, extra build steps, the need to also import type definitions when including a library, cluttering the code with interfaces and type definitions.
I find the extra value it gives over PropTypes in React is pretty low. And while types in function signatures arguably increase understanding, elaborate interface definitions, sometimes in their owen files with the need to import them, can clutter up the code and be a detriment to readability. Also, VS Code's auto completion is very good even without TS.
by theodorejb on 9/27/18, 4:21 PM
by tlarkworthy on 9/27/18, 6:48 PM
There is nothing in typescript that actually ties the type system to the event loop. I would love the Typescript language applied to a runtime that was ok with blocking IO.
by yawgmoth on 9/27/18, 5:38 PM
by dlbucci on 9/27/18, 6:12 PM
by velox_io on 9/27/18, 5:40 PM
Could they be removed?
by ZeikJT on 9/28/18, 2:44 PM
by novaleaf on 9/27/18, 8:44 PM
right now it's only meant for nodejs use (it's too big for browsers) but I use it successfully in my production code, and have been using it for years, so it's got that for it :)
i plan to add proper browser support (minification, tree shaking, etc) when i do my next client side project, but that's still at least a few months off.
by crudbug on 9/27/18, 6:05 PM