Stories
Slash Boxes
Comments

SoylentNews is people

posted by n1 on Tuesday September 06 2016, @09:45PM   Printer-friendly
from the no-conference-for-old-men dept.

Douglas Crockford (JSON, JSLint, JSMin, Javascript: The Good Parts) is a founding father of modern Javascript. He is a frequent speaker on the Javascript circuit and, until recently, was the scheduled as the keynote speaker for the Nodevember Conference. For reasons no one can explain, he was removed from the conference schedule to help foster inclusivity. No one (including Crockford) knows why he was banned. Internet commenters have speculated it may have been due to a talk titled "Monads and Gonads" or slut shaming the "promiscuous" web or a his use of the gender (and species) exclusive phrase "hanging out there like a pair of dog balls". Others believe it's because he's a curmudgeon (aka grumpy old white cis heterosexual man). One of the Nodevember organizers (not involved with the decision to ban Crockford) has stepped down.

This is not the first time Crockford has experienced censorship -- he previously ported Maniac Mansion to the NES.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by jimshatt on Wednesday September 07 2016, @07:33AM

    by jimshatt (978) on Wednesday September 07 2016, @07:33AM (#398608) Journal
    Why the outer parens at all?

    function(a) { alert(a); }('sucking eggs'); // Doesn't work
    (function(a) { alert(a); }('sucking eggs')); // Works
    (function(a) { alert(a); })('sucking eggs'); // Works

    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 1) by nitehawk214 on Wednesday September 07 2016, @03:48PM

    by nitehawk214 (1304) on Wednesday September 07 2016, @03:48PM (#398748)

    Wait, both of the last 2 cases work? I assumed that only the last case worked as that is how I always see it done.

    I like the middle one much more.

    --
    "Don't you ever miss the days when you used to be nostalgic?" -Loiosh
  • (Score: 2) by JNCF on Wednesday September 07 2016, @05:17PM

    by JNCF (4317) on Wednesday September 07 2016, @05:17PM (#398787) Journal

    In most real cases, the outer parens aren't necessary. If you change your first example to be the value assigned to a variable, it will work:

    var x = function(a) { alert(a); }('sucking eggs')

    As for why we would want to add outer parens, it's a matter of human readability. Let's break this example up into multiple lines.

    var x = function(a) {
        alert(a);
    }('sucking eggs')

    Now, if you looked at the first line of that function, you could be forgiven for assuming that the value of x is currently a function (though of course x is undefined, since that is the value returned by the function). Let's look at it with parens:

    var x = (function(a) {
        alert(a);
    }('sucking eggs'))

    Reading the first line, you should already know that we're going to do something with that function before assigning anything to x.

    My only real argument against dog-balls-style is that it sort of undermines and confuses this point, since the parens only actually encompass the anonymous function and the invocation that comes after the end-paren. Looking to the end of the parens, a reader could still assume that x was a function. Of course the invocation is right next to it, not broken off onto another line that's potentially off-screen, and I don't think this is nearly as important of a distinction for readability.

    • (Score: 2) by JNCF on Wednesday September 07 2016, @06:54PM

      by JNCF (4317) on Wednesday September 07 2016, @06:54PM (#398821) Journal

      My only real argument against dog-balls-style is that it sort of undermines and confuses this point, since the parens only actually encompass the anonymous function and not the invocation that comes after the end-paren.

      Fixed that for me.