What is the Webassembly?

Asked

Viewed 1,866 times

31

Reading random articles, I read one that predicted the end of Javascript through Webassembly, which seems to be a way to get other languages to do Javascript’s work, but I’m sure this is a wrong definition.

  • What is Webassembly? How it works?
  • Where it will be used?
  • How you can replace Javascript someday?
  • How is your safety? After all, it allows many
    possibilities and perhaps many loopholes.
  • 4

    Webassembly will end Javascript in the same way that [insert one of several languages here] would end Java.

  • @Renan I fully agree, until today I think the article that said it (tableless), wanting to call much controversy.

  • An argument about pq using webassembly: Think of billions of people accessing applications on the internet, think of billions of machines interpreting gigabytes of scripts and running interpreted versions. Think about the waste of processing time and energy... Maybe it will not end but possibly become preferential among publishers.

1 answer

28


In my opinion based on almost 40 years of experience, for the good and general happiness of the nation of programmers, the JS "will end" even :P Or at least it will cease to be used by many. But let’s get to the facts that’s what matters. And for those who didn’t understand that was a joke.

What is Webassembly? How it works?

Do you know what an Assembly? Well, in the end I put a series of links that can help understand some basic concepts on the subject.

Webassembly is a low-level language that has a one-to-one relationship with instructions from a processor of some platform. In this case the platform is a virtual machine, unlike physical computer processors, and this platform will run using web technologies, most likely in a web browser.

The instructions she understands are the most basic possible (or almost) to do all kinds of processing necessary making her a machine with Turing completeness. So it is only able to do basic arithmetic, relational and logical operations, carry values between parts of the architecture and control the execution flow through a simple conditional or unconditional deviation. It’s all very concrete, it doesn’t have the abstractions that we find in most languages. These instructions have the ability to perform anything if used in a correct set.

Then any language can be compiled and generate a Webassembly code that can be sent to the browsers that will execute what you want. Hardly anyone will program directly in Webassembly, although possible.

In addition to allowing programming in any language, it will give more flexibility and speed since the code no longer needs to be interpreted.

In fact the general concept of Webassembly involves other aspects, not only the language. But this is what matters most to most programmers.

Where it will be used?

In any standard web browser or other software that wishes to have this capability, conforming to web standards that will be set for the future.

How you can replace Javascript someday?

In fact JS has many adherents nowadays and so he will not end. But it is recognized that it is a very problematic language and now has the chance to use other languages to program front end, then many programmers will prefer this way.

It is not meant to end Javascript, it is even possible that in the future people will program in JS and manage a Webassembly. There will be a stampede of programmers who never liked JS but were required to use because they had no other option.

The transition will be slow and only in the very long term will there be a strong migration.

These are the consequences of technology. Obviously there is a bit of speculation (many are slowly confirming themselves). Every time a tool is provided that offers clear advantages over another, it tends to weaken the other even if it is not the goal.

The only clear and important disadvantage of Webassembly is transitory, since a whole web day will accept it. There are other less obvious and even subjective.

How is your safety? After all, it allows many possibilities and perhaps many loopholes.

There’s no reason security should be worse. Actually it might be better because it might solve some problems that existed and could no longer be fixed and the code will be a little more protected. Not that the code cannot be seen or manipulated, but it will no longer be useful for the laity (and many people who program is secular, incredible as it may seem).

The security problem has never been in Assembly and will not be in Webassembly. This problem is in your surroundings.

Read also:

Completion

According to my prediction, which was contested at the time of this response, Webassembly is a success and is used the way I said it would be. And of course the JS follows firm and strong in those who like him.

  • 5

    Friend, I think I read some untruths there in this your reply, Webassembly is not a language, it is just a binary specification to give instructions to the vm so that the parser is more peaceful than translating the written Javascript language, Another thing that can confuse readers is that you speak as if the language were not to be interpreted, in fact it will continue to be interpreted.

  • 3

    Another point that I think is important to make clear is that Webassembly is an add-on to Javascript since it is being developed to access the Javascript api from a binary instruction, that is, Webassembly is not being created to replace Javascript.

  • 3

    On the security issue I also think the answer should be reviewed, has nothing to do with comparing Assembly with webassembly, in this case, just mention that the security of Assembly will be linked to the same security of the current Javascript as it is just one more way to access the Javascript API. About the code to be seen or manipulated, it must be mentioned that even in binary the code can be debugged and even the binary code has its legible written representation, that is, it is still open source. there is not much difference from uglify,

  • 4

    Well, you’ve already added a few things, although in a general way it’s more a matter of opinion or interpretation, conceptualization than facts. If you read the documentation ipsis literis and/or superficially in fact what you have said is concluded. If you read everything, interpret the consequences of all this and read what is not in the documentation. One thing is the official goal, another is what it allows to do. I didn’t want to go into detail because it doesn’t seem to be the purpose of the question. In fact there are terms in the documentation that run away from what is usually conceptualized. Surely it is more than a language.

  • 4

    But it is a language too, if you understand what a language is. It is interpreted, but not in the same way as JS. You speak in binary format yourself. The rest is written in the answer, even if your text gives the idea that it is not. I do not know if you have the knowledge of the basics of computing, if you have any questions you can create a new question quoting this to clarify points that you want more details. Has links in the answer they help understand.

  • @Maniero, with so much Web technology coming on, it’s hard to define a technology to learn at first. I started studying Javascript and I heard a podecast yesterday, where it was talked about JS and the subject addressed here was addressed, however, I understood that the JS will not end but decrease the total dependency on it.

  • @Diegofarias yes, basically this.

Show 2 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.