Live data from Hacker News

Should JavaScript be split into two languages?

devclass.com

311–320 of 324 posts

Re: Should JavaScript be split into two languages?

#311
post #310
post #302

Earlier quoted context omitted.

Are you replying to the correct person(s)? :-) Only the last quote is mine, and I stand by it.

I listed those quotes to rebut your assertions that we’re being hostile towards a group of people who are merely trying to talk about something interesting, not to imply attribution of all of the quotes to you. I chose the general phrase “the commenter” because it would not have been correct to say “you”, as I was aware you were not the source of many of them.

I can see where you're coming from, but my intent was to talk about the very first interaction that started all of this nonsense:

- I said WebAssembly can already manipulate the DOM with functions.

- He asked for an ergonomic example because StackOverflow told him it can't be done. The "we can have DOM access at home" bit seems like the start of things to come.

- I provided a concise example, and expressed skepticism that this would settle the discussion.

- He responded with sarcasm, and weirdly accused me of sarcasm.

- I reacted poorly to his bitchy and ungrateful reply.

My best guess is that the WAT format confused him. He didn't know it was a programming language, and he didn't know you could do it with other programming languages, so he got insecure and lashed out.

Do you have a better explanation for the weird transition from technical discussion to flame war and hurt feelings?

Re: Should JavaScript be split into two languages?

#312
post #307

Earlier quoted context omitted.

> Where did we say that? The first picture on the Wikipedia page shows the tower as a linear stack of items from set theory. The Scheme predicates are named similarly. This is the appealing myth. In the section where the wikipedia page talks about exact and inexact, the specific thing you were calling out, it says "Another common variation is to support both exact and inexact versions of the tower or parts of it; R7R…

I'm sorry for misreading your comment about the term "tower". :-) > do you object to using the word "tower" to talk about it No, I don't really care about the terminology, except when it helps to communicate. > do you object to the graph of number types described by that paragraph I think the problem boils down to using a flawed analogy to arrive at a conclusion and then pretending the conclusion is sound and elegant…

Okay that makes sense. I do think the issue of overstating is real, given the compromises you need when actually implementing.

Re: Should JavaScript be split into two languages?

#313
post #307

Earlier quoted context omitted.

> Where did we say that? The first picture on the Wikipedia page shows the tower as a linear stack of items from set theory. The Scheme predicates are named similarly. This is the appealing myth. In the section where the wikipedia page talks about exact and inexact, the specific thing you were calling out, it says "Another common variation is to support both exact and inexact versions of the tower or parts of it; R7R…

I'm sorry for misreading your comment about the term "tower". :-) > do you object to using the word "tower" to talk about it No, I don't really care about the terminology, except when it helps to communicate. > do you object to the graph of number types described by that paragraph I think the problem boils down to using a flawed analogy to arrive at a conclusion and then pretending the conclusion is sound and elegant…

[deleted]

Re: Should JavaScript be split into two languages?

#314

> Regarding BigInt, the presentation states that “use cases never materialized.” Yet every language has either that or BigDecimal. Even if Google's frontend devs haven't found a use, there also exist JS devs outside of Google who certainly have found uses (though possibly more of them on the backend). Similarly, not every developer has a compilation step in their JS work. And there are places where you can't have one…

Would help if it worked with JSON by default.

Yeah, it’s annoying, but the polyfill is like 3 lines.

Re: Should JavaScript be split into two languages?

#315
post #117

Earlier quoted context omitted.

Did they solve GC and DOM access ? It's been years since it was "just about to happen" and I stopped paying attention in the meantime. But if it had that I agree - it would be ideal if JS was a legacy thing and a saner WASM first class language got to replace it. Keep the single threaded event loop approach but kill the JS semantics.

Actually I don't want DOM access and GC for wasm. At least not yet. It overcomplicates a lot and I simply cannot imagine that a GC can be one-size-fits-all languages. I want fixed-size buffer-backed structs for JS. Basically a DataView as a C struct. This would massively benefit interop and solve some shortcomings of DataView. There was a proposal for a binary AST for JS several years ago [1]. Why not just use that a…

(I was the tech lead for this proposal)

How would this be useful for a JS0?

Re: Should JavaScript be split into two languages?

#316

> Regarding BigInt, the presentation states that “use cases never materialized.” Yet every language has either that or BigDecimal. Even if Google's frontend devs haven't found a use, there also exist JS devs outside of Google who certainly have found uses (though possibly more of them on the backend). Similarly, not every developer has a compilation step in their JS work. And there are places where you can't have one…

Example: Sindre Sorhus' FNV library uses BigInt to support hashes up to 1024 bits. It's quite popular (for a hashing algorithm) on NPM, with 80k+ downloads / week.

https://www.npmjs.com/package/@sindresorhus/fnv1a

Re: Should JavaScript be split into two languages?

#317

Earlier quoted context omitted.

You're joking, right? A 2mb bundle is *absolutely unacceptable*. People complain about React which is less than 100kb minified and gzipped. This website doesn't even include any images or anything...

It's clearly not. Real world applications exist today. Here's one: https://earth.google.com/

2mb for Google Earth might be fine, but Google Earth is not your typical web app.

A 2mb base floor before any code or assets is not acceptable for most use cases.

Re: Should JavaScript be split into two languages?

#318
post #287

Earlier quoted context omitted.

Sorry to bust your minuscule lisp bubble but just because someone ignored your favorite niche language in an educated career choice, it doesn't mean they are ignorant. Infantile language tribalism though, have no place in engineering and is blatant ignorance when coming from a supposed adult.

Lisp is a family of languages, most of which are suited for many purposes. Implementations of Lisp are no more niche than other languages with managed run-times. Lisp has been used for even operating system development: Lisp code taking interrupts, and driving ethernet cards and disks and so on. Which member of the Lisp family are you talking about, and what do you think is the niche?

> Implementations of Lisp are no more niche than other languages with managed run-times."

No more niche than Java, C# .NET and Python? Right...

> Which member of the Lisp family are you talking about, and what do you think is the niche?

You can combine all of the Lisp family together and still it wouldn't scratch the popularity, demand or job positions of any of the top languages.

Look, nobody denies Lisp'like languages are being used. Just like Fortran. :)

Re: Should JavaScript be split into two languages?

#319
post #318

Earlier quoted context omitted.

Lisp is a family of languages, most of which are suited for many purposes. Implementations of Lisp are no more niche than other languages with managed run-times. Lisp has been used for even operating system development: Lisp code taking interrupts, and driving ethernet cards and disks and so on. Which member of the Lisp family are you talking about, and what do you think is the niche?

> Implementations of Lisp are no more niche than other languages with managed run-times." No more niche than Java, C# .NET and Python? Right... > Which member of the Lisp family are you talking about, and what do you think is the niche? You can combine all of the Lisp family together and still it wouldn't scratch the popularity, demand or job positions of any of the top languages. Look, nobody denies Lisp'like langua…

So what you mean by niche is actually popularity, and not a specific application area?

Fortran has a niche: numeric computing in scientific areas. However, even Fortran is not your grandfather's Fortran 66 or 77 any more. I had a semester of the latter once, as part of an engineering curriculum before switching to CS.

It supposedly has OOP programming in it, and operator overloading and such.

I don't know modern Fortran, so I wouldn't want to look ignorant spreading decades-old misinformation about Fortran.

Re: Should JavaScript be split into two languages?

#320
post #125
post #116

I would like to see an in-depth treatise explaining why existing bytecode VMs (LLVM, JavaVM and Ecma CLR) were never seriously considered for the world of browsers. These VMs already exist for numerous platforms, have been optimized to death, already have plethoras of languages that compile to them, and beside JavaVM are open source (Ecma CLR exists in the Mono project). I've looked at WebAssembly and I don't underst…

My guess is that none of those bytecode VMs were designed with the explicit goal of running untrusted code at global scale in a rock-solid sandbox. If anything, I expect those existing VMs to slowly be replaced by WebAssembly due to how crucial and complicated that very specific sandbox requirement is - and how useful that is once you have it working reliably. Personally I never want to run untrusted code on any of m…

From the day WebAssembly was announced:

https://news.ycombinator.com/item?id=9732827

The Web is an evolving system too large and long-lived for any single company, stable consortium, or standards body capable of doing the deed to do it, so none of Java, Flash (AVM), .NET/CLR, NaCl/PNaCl, Dart, and others I have forgotten about ever had a chance to take over.

JS got out first and evolved through several jumps into https://asmjs.org/, a typed (as in static types) subset suitable with AOT+JIT techniques of hosting near-native-speed code such as Unreal Engine 3. https://brendaneich.com/2013/03/the-web-is-the-game-platform...

Java was mismanaged as a plugin (and only ever a plugin -- no deep or even shallow browser integration worth talking about) by Sun, who tried getting it into Windows after Microsoft was killing Netscape (Microsoft then killed Java in Windows, pulled trigger on .NET; Oracle later bought Sun).

Flash had its day but fell to HTML5 and fast JS, Adobe threw in the towel well before Wasm announcement, even salted the earth re: good Flash tools instead of retargeting them at the Web.

Google was a house divided all along but had absolutely no plan for getting PNaCl supported by Apple, never mind Mozilla or Microsoft. I told them so, and still get blame and delicious tears to drink as I sit on my Throne of Skulls, having caused all of this by Giant-Fivehead mind control (testimony from one of my favorite minions at https://news.ycombinator.com/item?id=9555028).

Post reply on HN