Language-wise, the other issue JS has is that it lacks operator overloading, which makes array handling a lot nicer. Python has magic methods for doing that. Julia, R and Matlab have that built into their languages. Julia also has it's own version of reactive notebooks similar to Observable.
And then you have a lot of scientists who already know and use Python, R or Julia. I can't really imagine a statistician who's well versed in R finding much value in JS. Javascript just isn't made for complex statistics the way R is.
JS now feels like Java back at the turn of the millennium, when people were thinking Java could just be used for everything, and it sort of was. Or any language could run on the JVM (the web has largely replaced that idea). But there's a reason for the various different programming languages. Some are just better at doing certain things. And JS is not a scientific computing language.
It's a very promising technology IMO. Not necessarily because it is faster (which is only 0.3x-2x according to my findings) but because it is a nice, simple compilation target.
Agreed that for some things, it would be great to be able to explicitly offload to the browser.
I have not yet tried to load a lot of data into it. Would be interesting to see when the load time starts to outweight the benefits of instant calculations. Maybe at something like 10 million datasets? Hard to say.
Here is an example instance: https://notebook.basthon.fr/
The thing is, creating a whole stack in pure JS would be very hard, since the current scientific stacks uses a lot of fortran, assembly and C with python to bind them all. Or julia. It's millions of man hours we are talking about.
So compiling Python into WASM is probably the best deal for such an app.
For the regular web, it would be a deal breaker: you don't want to load 15 mo of runtime before being able to interact with a web page. But for such a scientific app, it's not a problem. Besides, were you to write it entirely in JS, the size would be huge as well.
I often think that with the current state of Javascript in the browser, we could build an awesome, super fast, Jupyter style notebook software that runs completely in the browser. With the modules implemented as native Javascript modules which are dynamically loaded.
Is anybody working on this?
I have built a rough version of this idea for myself and been using it for my own statistic needs for a few months now. It is far from being polished/flexible enough to be useful as a general purpose notebook though.