7 thoughts on “MPL 2.0 Released

  1. Awesome! And now for some semi-bikeshedding (not of the license!). :-) These comments refer to the text of http://www.mozilla.org/MPL/headers/ (mentioned on IRC a few hours ago) which seems to have the new boilerplate.

    The C-style header section puts the closing “*/” on the same line as the final line of boilerplate text. This makes it less readable in my view, because you have to disambiguate comment-closing token from comment text. Also, most Mozilla code doesn’t use that style for comments — it puts the closing “*/” on a new line. I also tend to think it’s less comment to have multi-line comments where the “/*” is on the same line as the first line of the comment. It adds a couple lines, but could you change the C-style boilerplate to this, please?

    /*
    * This Source Code is subject to the terms of the Mozilla Public License
    * version 2.0 (the “License”). You can obtain a copy of the License at
    * http://mozilla.org/MPL/2.0/.
    */

    The JS engine in particular is very consistent about its commenting style. If the current license header listed on that page is used, this comment is going to stick out like a sore thumb in every JS file. Someone will doubtless attempt to correct this at some future point, if the current template gets used for the whole-tree rewrite. I’d rather not have to see the inconsistency, or warn others against correcting it, for the rest of time. :-) My proposed boilerplate above solves these problems (assuming the pre-formatting via HTML tag passes through your comment mechanism).

    The XML-style boilerplate embeds the message in a comment, and that comment contains “–” within the comment text. XML forbids including “–” in comment text, because in SGML “–” turned comment mode on and off, extremely bizarrely. So this boilerplate will be unusable in XUL code, XBL code, and so on. This concern really isn’t just questioning the paint color — it must be fixed. I don’t have particular concerns about what the exact preferred formatting would be.

    The public-domain boilerplate has essentially the same problems as the MPL boilerplate. I recommend the same sort of fix for the C-style boilerplate.

    That’s all I’ve got for now. Thanks for the MPL work! A much smaller license header will be so much nicer for readability.

  2. Sigh, and the preformatting didn’t make its way through. Each line of the C comment but the first begins with U+0020 SPACE U+002A ASTERISK, and I think that captures the lack-of-preformatting information loss.

  3. Jeff: I’ll look into that first thing tomorrow; but are you really sure that the majority of the project would prefer a 5-line header over a 3-line header (a 66% increase) in order to maintain a consistent comment style?

    You are right about the dash-dash in the XML/HTML comments; that’s my mistake, and inconsistent with previous style. Will fix.

    Gerv

  4. One other note: please don’t go switching over big swathes of code. I have a script for that, and we’ll do it in a coordinated fashion.

    Gerv

  5. Gerv, I think most people will be happy to pocket either near-equivalent massive decrease. As for those last two lines of removal, the incremental benefit of two fewer lines won’t offset the detriment of inconsistent comment style.