emscripten

Adam D. Ruppe destructionator at gmail.com
Sun Dec 19 09:14:37 PST 2010


bearophile:
> On a more modern browser it works "well enough" (Firefox 4).

This is a bit of a rant, but I hate how the web community
always uses "modern browser" like this.

I ran this site on Firefox 3.6.3. The most recent one it offers
on getfirefox.com is 3.6.13 - I'm not very far behind! My about
firefox box says Gecko from April 2010.

That should be modern by any sane definition!

(Now, my every day browser, Konqueror 3.5.7, is (c) 2005. So
I can understand it not being a "modern browser". But it works
for me so I won't change it. Something I find hilarious though:
it's CSS2 compliance was better than firefox up until about
last year!

I just wrote a site going wild with css for a web demo for the
company, and it worked almost as well in my old Konq as it did
in my newer Firefox. The kde folks did a really impressive job
there.)


Anyway, it just irks me that so many web evangelists say "modern"
when they really mean "bleeding edge". And in Google's case, it
is even worse: when they say "all modern browsers", they actually
mean "/our/ bleeding edge beta". It really annoys me.



Back on topic:

> So I think emscripten is a very nice toy.

I agree completely, it's a cool toy and pretty impressive that they
got it to work as well as they did. I just don't think it is
usable or really desirable for real work. Maybe it will improve,
but it still has to compete with straight up javascript, which
is already good enough for most places where you really need it.


> Regarding the JavaScript language, they are going to fix some of
> its biggest mistakes (but not semicolons yet, hopefully later),

Interesting. Some comments from the article, then back to you
to comment on octal! at the end:

"Strict mode requires that all variable binding be done statically."

I wonder how that will change the javascript "this" keyword. I
originally found it confusing, but now that I know its rules it
isn't so bad and is sometimes extra useful.


"You should explicitly declare all of your variables."

"Should"?? If this is actually a strict mode, shouldn't it be
"must"? Maybe the author is just being sloppy, but this wording
makes me think it moved from implicit global to implicit local.
Definitely better, but still requiring "var" in all cases is
better yet.


"Noisy Failure"

Something important about failure is it isn't just the language.
The environment needs to tell you too.

Browsers often either hide errors or annoy you so much about them
you want them hidden. Some support an onerror event so you can
hook it yourself, but not all browsers do.

It would be nice if the browser behavior on error in strict mode
was improved too.


...or better yet, give us a compiler ahead of time! JSLint is
OK I guess though, but I rarely use it.


"There are still problems in JavaScript that strict mode does not address."

Yes, and those things still suck. But if you use js sparingly,
you don't have to deal with them too much. :)


Back to bearophile:

> (and the octal!x syntax is not a significant improvement of the situation):

Sure it is! The problem is that the old syntax is still accepted
instead of either breaking C or giving a compiler error. This is
one place where Walter and I disagree, but to move to a new
way, we eventually need to remove the old way.


More information about the Digitalmars-d mailing list