http://www.perlmonks.org?node_id=351522


in reply to Re(3): Perl 6 Whitespace Issues
in thread How to Sell Perl 6

This minor inconvenience
It may look minor to you. But think how often you index in a hash in a typical program, and how often you call a method/subroutine on the LHS of an operator. All those minor inconveniences add up to one big inconvenience.
for the benefits we gain. Many of those benefits, in fact, are involved with giving Perl a powerful, robust OO model.
*blink* Then I must have understood the benefits of significant whitespace totally wrong. The hash index without whitespace gives us the ability to leave off parenthesis around an if clause. The sub/method whitespace rule gives us the ability to sometimes leave off parenthesis in an expression. It's completely unclear to me how the whitespace rules are being used to build an OO model.

I might be willing to accept the significant whitespace rules if there was a significant gain. So far, every gain I've seen explained involves the ability to leave of parenthesis.

Abigail

Replies are listed 'Best First'.
Re: Re: Perl 6 Whitespace Issues
by ysth (Canon) on May 07, 2004 at 17:12 UTC
    How do you feel about the %hash .{key} workaround? I think you are really in the minority, and asking you to slightly adapt your style makes sense there.

    On the other issue, the GNU coding style calls for spaces between function name and parenthesized argument list, and is used by a great many people (though not by me except where required by local standards). I imagine there would be an uproar if perl6 were released only with a GPL incompatible license. I regret there isn't a similar uproar over this issue.

      How do you feel about the %hash .{key} workaround?
      About as bad as %hash{key}. The dot there is unnatural, and doesn't make the code more clear.
      I think you are really in the minority, and asking you to slightly adapt your style makes sense there.
      Minority or not, that doesn't matter. Larry's view are clear - there's no chance in hell he's going to change his mind on this one. But for me it's a big deal - a very big deal, and it doesn't become a lesser deal whether I'm in the minority, the majority, or alone. For me the issue is big enough that I don't see myself ever programming in perl6, and hence I ain't going to "sell" perl6.
      On the other issue, the GNU coding style calls for spaces between function name and parenthesized argument list
      For me, there's hardly a difference between indexing in an array or hash, and calling a subroutine. And, from the point of the expression where the indexed element, or the subroutine value is used, there is no difference. Indexing in an array or hash is just a call to a subroutine with one argument. Which is why I put whitespace between an array or hash name and its index, and I put whitespace between a function name and its argument(s).

      Abigail

      On the other issue, the GNU coding style calls for spaces between function name and parenthesized argument list, and is used by a great many people (though not by me except where required by local standards). I imagine there would be an uproar if perl6 were released only with a GPL incompatible license. I regret there isn't a similar uproar over this issue.
      Huh? The GNU coding style is not mandatory for GPL projects. It may be mandatory for GNU projects, but Perl is not part of the GNU Project, is it?
        The GNU coding style is not mandatory for GPL projects.
        I wasn't saying it was. In fact, the spaces are just a recommendation and aren't even mandatory for GNU projects. I was making an analogy.

        Based on conversation with TimToady in the cb today, it sounds like this misfeature has been reconsidered. Update: apparently not :(.