Live data from Hacker News

Should JavaScript be split into two languages?

devclass.com

211–220 of 324 posts

Re: Should JavaScript be split into two languages?

#211

Earlier quoted context omitted.

It already supports WebAssembly. All browsers do. Here's a demo of Dart and Flutter compiled to WebAssembly: https://flutterweb-wasm.web.app/ WebAssembly enables you to use any language. And when you can use any language, why would you use JavaScript? Google has started migrating parts of Google Sheets to WebAssembly. They're compiling Java to WebAssembly and seeing a 100% performance increase: https://web.dev/case-s…

[flagged]

Well this person is not the only one who thinks js (and web stuff in general) is terrible. I mostly dislike the pace of crapification; I comment almost daily on repositories asking why they made that breaking change with zero benefits for the user. Usually 'we are cleaning up' or so; there are npms that really need never be changed that are changing weekly just because 'keep them fresh'. That kind of misery is just weird and frankly depressing; update something one week after writing and plop, it breaks. For No Reason as no improvements were made, just breakage for the sake of upping the date on github and npm (the most terrible I find the VC backed open source ones; I guess they have to update all the time for the sake of the VCs looking in even though no updates are required). I use lisp, c++ and go libraries that haven't been updated in 10 years; guess what; they work and work well and stable for another decade because they really never need anything new and people are not vying for update kudos or whatever.

But you can use vanilla js you say? Yes it is true, but I find js very terrible and I want to write things in common lisp, or, if need be, Go. Neither of these require any bullshit with tooling or anything hard. You can learn enough Go in a few hours to be productive (like C) and llms are super at it (unlike js/ts where they produce things that had breaking updates 40 times since the llm knowledge cut off for no reason at all). With vugu framework you don't need to touch js either. Common lisp is also not hard to learn, bit harder but even better tooling and you don't need to know all of it to write nice stuff; there is the clog framework which is basically all you need to get going as it is an ide, web dev environment and you get away with writing almost no js.

Re: Should JavaScript be split into two languages?

#212
post #4

Better to focus on WebAssembly instead. Bring every language to the web. JavaScript for some scripting, any other language for bigger applications.

Then you add capability to hide the browser chrome and build close to native user experience and we will have truly looped the loop. Think about that: the browser as an intermediation ensuring resources are properly shared and each application is shielded from the others. Everything that’s old is new again. /s On a serious note I don’t see the point in turning browsers into an OS on top of the OS. I know it’s some ki…

I was in your camp, but we truly lost. Almost everyone I know literally ONLY uses a browser for everything. On mobile some things force you app use, but if that weren't the case, people would use it from a browser. Games in browsers, movies, email, anything. So it makes sense to only open a browser in an OS; it is basically what users do anyway.

Re: Should JavaScript be split into two languages?

#214
post #190
post #168

Earlier quoted context omitted.

that's not what pike is doing though. int and float are still kept separate. btw, i just checked, typeof() no longer shows the difference between int and bigint. it did in the past if i remember correctly

You gotta read between the lines with the commenter above. Their name is a reference to "Smug Lisp Weeny", and they're part of the religion (cult) that thinks everything in Lisp (usually Common Lisp) is perfect. He couldn't care less about Pike, except as an excuse to be smug about Lisp.

Besides his nick, was he smug? He just noted that Lisp(likes) solve this problem for some version of 'solve' with the numerical tower. The implementations don't (usually; I am not aware of any) mix exact and inexact as that would be foolish obviously.

Re: Should JavaScript be split into two languages?

#215
post #169
post #158

Earlier quoted context omitted.

> i thought there can't be any such example because javascript is the only way. the difference is between code written in javascript which is fast of course and accessing js functions from WASM That doesn't have to be true. Eventually WASM will get direct access to the full browser API, without going through JavaScript. The browser exposes a browser API to the JavaScript VM it hosts, so things like the DOM are availa…

That doesn't have to be true. Eventually WASM will get direct access to the full browser API, without going through JavaScript. well, that is what i am waiting for. my point is that it's not the case yet, while the gp seemed to suggest that it's not needed because access through the host is available

A fundamental aspect of the Wasm capability security model is that all access to the outside world (I/O) is controlled via imports. Direct access to the entire browser API doesn't make sense in this context.

Re: Should JavaScript be split into two languages?

#216
post #154

Earlier quoted context omitted.

Interesting. I did assess the ES6 coverage of ~97% a month ago. I just evaluated that while it sounds high, 3% of people is a lot of people to cut off if your JavaScript is essential. E.g. Firefox sits at ~2.7% browser market share. (Not incidentally the part that doesn't support ES6, but it's a demography the size of my own.)

> 3% of people is a lot of people to cut off if your JavaScript is essential These are probably the 3% that won’t affect your business much. They’re more likely to be on older hardware and also have less discretionary income. Or browsing on really weird hardware that is also unlikely to lead to a sale.

I always assumed it was people browsing on work computers that they don't control.

Re: Should JavaScript be split into two languages?

#217
post #196

Earlier quoted context omitted.

> 3% of people is a lot of people to cut off if your JavaScript is essential These are probably the 3% that won’t affect your business much. They’re more likely to be on older hardware and also have less discretionary income. Or browsing on really weird hardware that is also unlikely to lead to a sale.

People with "less discretionary income" still deserve to access the web in a way that isn't broken. This might come as a surprise nowadays, but the web can be useful for more than just selling things.

I have a $30 cell phone that runs the latest version of Chrome.

Re: Should JavaScript be split into two languages?

#218
post #190

Earlier quoted context omitted.

You gotta read between the lines with the commenter above. Their name is a reference to "Smug Lisp Weeny", and they're part of the religion (cult) that thinks everything in Lisp (usually Common Lisp) is perfect. He couldn't care less about Pike, except as an excuse to be smug about Lisp.

Besides his nick, was he smug? He just noted that Lisp(likes) solve this problem for some version of 'solve' with the numerical tower. The implementations don't (usually; I am not aware of any) mix exact and inexact as that would be foolish obviously.

> Besides his nick, was he smug?

Saying, "That's nice." is a cliche condescension. You're free to disagree, but I think his intent was clear.

Re: Should JavaScript be split into two languages?

#219

Earlier quoted context omitted.

What's old is new again :) asm.js came about because it was a very optimizable subset of JavaScript, then it was superseded by WebAssembly, then the proposal in TFA is basically asking for asm.js back, but perhaps the better answer is to make WebAssembly fully support all of what JS could originally do. This is perhaps why as I get older I sometimes feel like I want to get out of software development and become a goo…

I think it’s much harder to make big leaps as a community with languages and other - relative to the technology stack as a whole - lower level concerns. Look at the stronghold grip of C/C++ and how long it’s taken Rust to gain a meaningful foothold in those realms for example. Google wanted to flat replace JS once already, that was the entire origin of Dart. They only pivoted to the cross platform mobile framework as…

Dart is a better designed language in many regards.

Re: Should JavaScript be split into two languages?

#220
post #218

Earlier quoted context omitted.

Besides his nick, was he smug? He just noted that Lisp(likes) solve this problem for some version of 'solve' with the numerical tower. The implementations don't (usually; I am not aware of any) mix exact and inexact as that would be foolish obviously.

> Besides his nick, was he smug? Saying, "That's nice." is a cliche condescension. You're free to disagree, but I think his intent was clear.

Ah, I did not read that into it. But guess that might be what he was doing.
Post reply on HN