News for hackers. Stuff that matters.
Re:WebAssembly: A New Hope by ChrisSD on Wednesday August 09, 2017 @01:55PM (#14971837)
"It's important to point out that it is designed to complement JavaScript not replace it and that in a browser context it has no direct access to the DOM, only via JavaScript."

That maybe true of current implementations but the design docs[0] appear to suggest that you will be able to import platform features in WebAssembly.

[0] https://github.com/WebAssembly/design/blob/master/Portabilit...

Re:WebAssembly: A New Hope by luke_wagner on Wednesday August 09, 2017 @03:14PM (#14972597)
Agreed, there was active discussion about this at the last WebAssembly CG meeting even: https://github.com/WebAssembly/meetings/blob/master/2017/CG-...
Re:WebAssembly: A New Hope by ilaksh on Wednesday August 09, 2017 @05:02PM (#14973575)
The biggest issue that I see and mentioned before is that the APIs are not versioned and instead rely on 'feature detection' which seems to be due to poor support for/understanding of modern style versioned modules in C++.
Re:WebAssembly: A New Hope by tomjakubowski on Wednesday August 09, 2017 @11:56PM (#14976202)
> understanding of modern style versioned modules in C++.

Could you enlighten us about this? Is this something to do with the eternal C++ modules proposal that never seems to make it into a standard?

The thing that comes to my mind when I hear "versioned modules" and "C++" is the way you can use "versioned" namespace re-exports to avoid ABI breakage, like so:

    // header for version 1 of library
    namespace mylib {
    namespace v1 {
      struct Foo {
        int num_apples;
      };
    }
    using namespace v1;
    }
    
    // header for version 2 of library
    namespace mylib {
    namespace v1 {
      class Foo {
        int num_apples;
      };
    }
    namespace v2 {
      class Foo {
        int num_apples;
        int num_bananas;
      };
    }
    using namespace v2;
    }
But I don't think that's what you mean.
Re:WebAssembly: A New Hope by flavio81 on Wednesday August 09, 2017 @02:11PM (#14972009)
Eventually it should replace Javascript. It ought to, because it defines a standard, versatile platform to execute code on the browser.
Re:WebAssembly: A New Hope by limeblack on Wednesday August 09, 2017 @04:39PM (#14973356)
Although you may be right I hope you are not. I like the semi open source nature and high levelness of JavaScript. It's not perfect but it beats dissembling things. Yes I know there are obfuscators.