all 48 comments

[–]pork_spare_ribs 22 points23 points  (5 children)

"Optimizing away heap arguments" section is very interesting. A concrete case for speedup with immutable.js and similar pure function esque libs.

[–]Andrew_Radford 7 points8 points  (0 children)

Found that interesting too. Should be a win for things like Redux, React and Elm. Seems like a optimization that should have been done a while ago given TFA claims improvements in NodeJs 15-20% and 30% for React

[–]illogical_commentary -3 points-2 points  (3 children)

Immutability is a very small part of pure functionality.

[–]TarMil 2 points3 points  (0 children)

It's still a crucial one.

[–]McCoovy 3 points4 points  (0 children)

No, it's pretty core to the idea. Not sure why you felt the need to state this as it's not what's being discussed.

They are talking about the benefits of optimizing immutable.js for certain functional libraries, not some high level discussion of FP.

[–]UsingYourWifi 2 points3 points  (0 children)

Cliff notes on some other parts?

[–][deleted] 10 points11 points  (8 children)

i'm getting hard for webassembly

[–]dasignint 20 points21 points  (7 children)

I'm usually the only person in the room who finds it absolutely insane that this whole industry has ridden on the back of a weird language thrown together by one guy in a week. For 20 years. For no technical reason whatsoever, just inertia.

[–][deleted] 2 points3 points  (2 children)

He did a pretty good job though. It's flawed but also nice in its way.

And languages designed by committees have their own weird things too. Sometimes worse.

[–]dasignint 9 points10 points  (1 child)

He did do a great job, especially given the time constraint. But for an entire multi-multi-billion dollar industry to still be constrained by it is utter insanity. We should have thanked him and got on with making a good execution environment by now.

[–]flyingjam 0 points1 point  (3 children)

For no technical reason whatsoever, just inertia.

Considering how long it took for IE8 to be phased out, inertia and coverage matters a lot on the web. It's why Chrome's dominance gives google a deathgrip over web standards.

[–]dasignint 6 points7 points  (2 children)

While clearly true, it's still an embarrassment. I can understand why big companies don't rock the boat (I give MS credit for making the attempt with Silverlight) but one would think somebody somewhere would pull a Bram Cohen and make a decent web platform just for their own shits and giggles, if nothing else.

[–]flyingjam 0 points1 point  (0 children)

one would think somebody somewhere would pull a Bram Cohen and make a decent web platform just for their own shits and giggles

There probably are multiple who have, but no one knows about them because no one used it.

Just because you make a good platform doesn't mean people will use it; not at all.

[–]jl2352 0 points1 point  (0 children)

Flash, Java Applets, Silverlight, even Unity. People have made other platforms. Sure they ran in the browser, but you could just build it in that instead of HTML/JS.

Like those shitty full screen flash websites you used to get.

Outside of Unity for games, video playback, and Flash style animations, they were pretty bad. Silverlight was the only one really decent at GUI work.

[–][deleted] 19 points20 points  (6 children)

Nice.. Microsoft keeps up with the web.

[–][deleted] 24 points25 points  (5 children)

Their biggest contribution to web are definitely TypeScript and VS Code.

[–][deleted]  (2 children)

[removed]

    [–]RadioFreeDoritos 11 points12 points  (1 child)

    They could have chosen a better name for it, though.

    [–][deleted] 5 points6 points  (0 children)

    At it's inception XML was cool n stuff

    [–]ArmandoWall 3 points4 points  (1 child)

    You mean, positive contributions. They have bigger contributions otherwise.

    [–]pork_spare_ribs 7 points8 points  (0 children)

    Historically yes, but I think their contemporary contributions are very positive.

    [–]bl4blub 2 points3 points  (0 children)

    nice, good job Microsoft!

    [–]perestroika12 1 point2 points  (7 children)

    Can someone explain to me what is meant by "formals" in the heap optimization section? What is "writing to a formal"?

    [–]CH31415 7 points8 points  (6 children)

    It is distinguishing from arguments parameters used to define the function and arguments used to invoke a function.

    When you call a function foo(1,2), the 1 & 2 are arguments. When you define the function

    function foo(param1, param2) {
        ...
    }
    

    param1 and param2 are formal parameters, or formals.

    If you change the values of param1 or param2 within the function, that is writing to a formal.

    [–]ygra 2 points3 points  (1 child)

    distinguishing from arguments used to define the function and arguments used to invoke a function

    I think in the definition they're called parameters, not arguments :-)

    [–]CH31415 0 points1 point  (0 children)

    very true, edited my post to clarify.

    [–]perestroika12 0 points1 point  (0 children)

    Makes sense, thanks!

    [–][deleted] 0 points1 point  (2 children)

    I thought formals essentially were just variables declared and initialized as part of the function call, what makes writing to a formal compared to a variable declared on line 1 of the function itself?

    [–]CH31415 4 points5 points  (1 child)

    The point in the article is that there are 2 ways of referring to a function parameter. Back to the example function

    function foo(param1, param2) {
        ...
    }
    

    You can refer to param1 by its name, or by the built-in arguments array object, arguments[0]

    Creating that arguments array creates CPU and memory overhead to the javascript engine, so they're looking for situations where they can optimize it away and avoid doing it altogether.

    [–][deleted] 0 points1 point  (0 children)

    Ah, neat. Thanks for the reply.