I prefer to think of it instead as native apps going away. Or rather, the web becoming indistinguishable from native.
If native apps start being run on WASM, and web apps start being run on WASM, and the web continues to gain access to more and more "native" APIs... it may not be long before there's basically no difference between a native app and a web app, from the end-user _or_ developer's perspective.
Bonus points if the default is to download, cache and update the source code and "installation" is just local compilation to an appdata folder or something, similar to what browsers do with HTML, CSS and JS, rather than just download a blob of bytecode. That would make the FOSS people happy.
If I understood properly: yes, I do share the bitterness.
<troll> Look at us introduce this great new lang! It will potentially get rid of 99.99% of the current web developers and prevent any future script kiddies from getting in the game!
Behold the speed of our sealed box environment little jimmy!
Stay tuned for next weeks episode of Tech%20Elitism where we cover DRM for the web and public discourse policing!
They can also do server side ads and make the url indistinguishable from another image asset. They haven't, so it isn't 'dire' enough yet.
But writing third-party search engines will become even more impossible.
Even Google’s OCR utility can’t reliably detect German Umlaute in fancy fonts.
Yet, plenty of people already prefer to send you a black page and manually write everything on the DOM's document. I certainly do not understand them, but they are way too common.
1 - You just write your content, and it's there. There isn't more declarative than that.
Probably because they're using front-end javascript frameworks which do that, and because they were taught that this is the best and most efficient way to render anything on the web. No one wants to make a special case for text because it seems inelegant.
I am beting once WebAssembly gets mature enough, we will get the revenge of plugins.
HTML has always been best at that, and will still be good at that in the future. The only contender I know of would be markdown, which fulfills many of those needs while being even easier to write. Its greatest pitfall in a contest against HTML is that it is by design non-standard, as it is meant to be a pre-render stage document, and presumably your render stage will smooth out any non-standard markdown elements, giving you a standard document in a format like HTML.
Even the apps will use HTML's model via their DOM tree.
If WebAssembly takes off, and is available on Windows, macOS, and Linux, would it be possible for me to build just a single binary from a C++ compiler which could work natively on all three operating systems? Would the WebAssembly project build the necessary infrastructure (linkers, dynamic loader, etc) for this to work?
If anyone is interested in the effort they should let me know.
Electron provides all that, but at the very high cost of shipping a complete browser runtime with your app.
Now you can ahead-of-time compile any JVM project into a single executable, it will run on all platforms, and it will have nice UI toolkits (JavaFX is quite awesome).
Even better, with Truffle + Graal in Java 10 also native interoperability with basically every other language is coming, so you can basically combine this with every language.
UI, for example, is hard to make platform independent if your application needs to look and feel native; or needs to plug into platform-specific features.
What would be useful is a way to easily call WebAssembly libraries from native applications. This way common business logic can be written cross-platform; but the parts of an application that need to remain native are left native.
Security maybe more of an issue today but WASM probably is not worse than JS in that regard (basically it's just another turing complete language). As others have said APIs are more problematic, which I suspect will ever get worse while browsers further and further try to transform from document viewers to application runtimes (think of such "brilliant" ideas like WebUSB). WASM is not the key issue here, it's running untrusted code on the client which, even if it's sometimes not outright harmful takes control away from the user in one way or antother. In the end the main difference is that it's now a feature of the Browser rather than a plugin which has a hard time to fit in nicely.
So many JVM bugs and a huge stdlib. WASM has no real lib, and when it does, it's security model is already restrictive... there's no disk, network, threads (yet), etc.
For example, you had to rewrite your apps to run as Java applets. You do not have to rewrite things to run on WebAssembly- all the existing C, C++, etc. code is compatible, up to the platform API.
But either way, I'd still take "use this object model for host GC interop" over "use this object model or leave the platform."
Then people started worrying about security and all of the Java applets broke because nobody wants to go through that code signing process.
I have to admit I don't know much about the security model of WebAssembly, but I wonder if it will become as annoying as Java in the future.
WebAssembly in browsers executes similarly to javascript in the same sandbox with the same platform APIs with the same kind of delivery methods, so I don't think we have that to worry about.
This is not true. There were alternative implementations from very early on, most notably the Microsoft one.
> ...and had many security issues during its life.
True, but WASM hadn't had much of a life so far, so we will see.
> And its communication with the rest of the browser was done through a slow and ugly channel (IIRC everything had to be sent around as strings).
From what I understand, so far, every communication between the browser and WASM has to go through JavaScript and from what I see I think it's ugly as well[1].
Don't get me wrong, I'm not at all against WASM, but I see the very same arguments for and against WASM I remember from the 90s about Java. This is especially true when it comes to security. Java was designed with a sandbox and a bytecode verifier from very early on.
[1] https://kripken.github.io/emscripten-site/docs/porting/conne...
My bad. However it was closed source too, and abandoned rather quickly.
> True but WASM hadn't had much of a life so far, so we will see.
It uses the same security model as JS, which is much more mature than VMs not designed for so much exposure to random third party code.
> from what I see I think it's ugly as well
Ugly but not slow. WASM memory can be read and written directly from/to a typed array, instead of converting strings. Since it's fast enough, one can make less ugly APIs wrapping that behaviour.
> Java was designed with a sandbox and a bytecode verifier from very early on.
They probably protected the code itself from escaping the sandbox, but not the environment (all the API in its complex glory). WASM on the other side is exclusively allowed to talk with JS (for now, at least), therefore the only API level bugs are in JS, not in WASM.
> WASM provides the basic technology for loading and authenticating signed code. This enables browsers to run trusted code in a trusted environment.
Sounds familiar? This is straight from 1998 [1](ha!) with JDK replaced by WASM and applet/classes by code;-) I hear you and I hope this is enough for WASM to succeed. Still I don't see the killer argument why I should believe it will.
[1] https://web.archive.org/web/19980214233937/http://java.sun.c...
So Flash, again?
METAL is coming.
http://www.retrocomputingtasmania.com/home/projects/burrough...
This could be a good thing, if done correctly:
1. Desktop apps have a common, safe runtime upon which they run, and the packages can be easily distributed (and verified?) by browsers
2. "Web apps" could potentially go away - leaving web browsers for what they were intended, document sharing