5 ms·
describe the steps to release the simplest ever code in javascript to production: write a js file, host it, done. The same thing in TS adds at least one step (
by gcbw3 6y ago
describe the steps to release the simplest ever code in javascript to production: write a js file, host it, done.
The same thing in TS adds at least one step (not to mention the rest of the tooling you will want)
So while a prefer it over JS, there's no arguing that it is more complex as now you require a build step for a language that only exist because people wanted a language without a build step.
- mattigames 6y agoBrowsers should just bite the bullet and add TypeScript support.
- nobleach 6y agoAt the rate the Typescript is releasing, that'd be a support nightmare. Perhaps a better solution is for TC39 to propose optional types. It could be modeled on Typescript for sure, but it would still be backward compatible.
- jessaustin 6y agoJavascript of today borrows liberally from coffeescript of yesterday, so it would make sense for javascript of tomorrow to borrow liberally from typescript of today.
- dynamite-ready 6y agoYou can have that with WASM. But then if that's an option, I think Typescript will be the last language I migrate to, because Typescript development culture, tending as it does towards overcomplicated solutions to simple problems, is unpalatable to me. I'm drawn to the idea of using Rust over WASM as a frontend language, and I think I'd rather choose that approach to develop any browser UI where type safety is critical, provided there is no discernable difference in performance (when compared to TS over WASM).
- cercatrova 6y agoYes, it's probably a better idea to improve WASM than add a proprietary format (TS is by Microsoft) to the open browsers. Google tried to do the same thing with Dart and it was decried about a decade ago, so now they use it for Flutter.
- dynamite-ready 6y agoI think it will be great once support is broad enough. It might, ironically, increase the current fashion for framework churn, but at least there will be no single language for developers to derride. In fact, I wonder how ECMAScript will fare in a post WASM world... I suspect it would still thrive tbh. Or perhaps people will take to other flexible, expressive languages for UI development. Like Python's niche in computer graphics, or Lua in games and AI research. I can still see myself using JS in that future. But not for everything.
- icedchai 6y agoAlmost nobody does Javascript without a build step these days, unfortunately. I miss those simpler days.
- tomc1985 6y agoYeah, fuck those guys. script tags or GTFO of my project!!
- IggleSniggle 6y agomy team (in a large enterprise) uses js for scripts using a shebang interpreter declaration, eg ``` #!/use/bin/env node console.log("hello cli") ``` While it does depend on node, and there are arguably better crossplatform languages for this purpose, it is a zero-tool chain use case that is very convenient for us.
- zelly 6y agoIf you don't need IE support and only care about modern browsers... <script type="module">
- Macha 6y agoAnd also don't use modern frameworks like React or Vue, or don't mind sticking all your templates in strings, or in your index.html, and shipping 100kb of template compiler to to user, or write render functions directly ala mithril.
- aprdm 6y agoI would say nobody at tech or hip company. A lot of fortune 500 companies with some developers who missed the trendy stuff still do it that way. I made a medium size website (30 pages) in React with pure javascript and dependencies being script tags in index.html to vendored files. So not even JSX. I did it that way because it was the easiest way to develop and deploy in that environment
- throwaway744678 6y agoNow, that is a bold claim. Are there any stats on that?