News for hackers. Stuff that matters.
Re:Etcd, or, why modern software makes me sad by gcbw3 on Tuesday July 14, 2020 @03:01PM (#23836210)
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.

Re:Etcd, or, why modern software makes me sad by icedchai on Tuesday July 14, 2020 @03:14PM (#23836385)
Almost nobody does Javascript without a build step these days, unfortunately. I miss those simpler days.
Re:Etcd, or, why modern software makes me sad by tbrock on Tuesday July 14, 2020 @05:19PM (#23838063)
You might like deno (https://deno.land) then!

It’s native typescript.

Re:Etcd, or, why modern software makes me sad by cutler on Thursday July 16, 2020 @09:18AM (#23858680)
Except for the core which was recently reverted to ES6 due to Typescript's slugguish compilation and inefficiencies.
Re:Etcd, or, why modern software makes me sad by aprdm on Wednesday July 15, 2020 @04:22PM (#23851166)
I 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

Re:Etcd, or, why modern software makes me sad by zelly on Tuesday July 14, 2020 @11:24PM (#23840897)
If you don't need IE support and only care about modern browsers...

<script type="module">

Re:Etcd, or, why modern software makes me sad by Macha on Wednesday July 15, 2020 @08:20AM (#23844138)
And 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.
Re:Etcd, or, why modern software makes me sad by IggleSniggle on Tuesday July 14, 2020 @08:07PM (#23839690)
my 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.

Re:Etcd, or, why modern software makes me sad by tomc1985 on Tuesday July 14, 2020 @07:10PM (#23839232)
Yeah, fuck those guys. script tags or GTFO of my project!!
Re:Etcd, or, why modern software makes me sad by throwaway744678 on Tuesday July 14, 2020 @04:47PM (#23837615)
Now, that is a bold claim. Are there any stats on that?
Re:Etcd, or, why modern software makes me sad by coldtea on Tuesday July 14, 2020 @05:02PM (#23837810)
"Nobody" here means few, or more loosely, much fewer teams than before, not "literally 0 people/teams".

And the group mentioned is (I deduce) not generally individual devs, enterprise devs building some internal thing, and so on but teams in companies doing public-facing SaaS, teams in startups, companies like Amazon/Google/Facebook/Apple all the way to AirBnB etc, and so on.

So, you don't really need stats for that.

Re:Etcd, or, why modern software makes me sad by icedchai on Tuesday July 14, 2020 @07:15PM (#23839270)
Yes, exactly. The larger the team, the more likely someone is a front end expert and wants to use latest cool framework, which will by its nature require a build step. Even for something simpler, you'll probably want it for cache busting, minimization, etc.
Re:Etcd, or, why modern software makes me sad by mattigames on Tuesday July 14, 2020 @06:35PM (#23838898)
Browsers should just bite the bullet and add TypeScript support.
Re:Etcd, or, why modern software makes me sad by nobleach on Tuesday July 14, 2020 @06:59PM (#23839131)
At 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.
Re:Etcd, or, why modern software makes me sad by jessaustin on Tuesday July 14, 2020 @07:41PM (#23839464)
Javascript of today borrows liberally from coffeescript of yesterday, so it would make sense for javascript of tomorrow to borrow liberally from typescript of today.
Re:Etcd, or, why modern software makes me sad by dynamite-ready on Tuesday July 14, 2020 @07:53PM (#23839566)
You 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).

Re:Etcd, or, why modern software makes me sad by cercatrova on Wednesday July 15, 2020 @09:33AM (#23844969)
Yes, 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.
Re:Etcd, or, why modern software makes me sad by dynamite-ready on Wednesday July 15, 2020 @10:31AM (#23845697)
I 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.