Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
That's why I'm a bit confused about what Abigail's objections really are because I can't see this as being a serious issue.

I don't find the issue significant enough to discard the rest of Perl 6, but I have to admit it's one of the very few areas of the language that I really don't like.

Actually I don't find the {} issue a problem personally. The heuristic of no-space = hash, space = block matches my code style, and the style of the vast majority of code that I come across, so it's not going to cause me any major hassles.

The method argument stuff on the other hand I find much more personally problematical.

I've written code in goodness knows how many languages over the last 20 odd years so I'd like to think I'm vaguely broad minded when it comes to syntax, but when I see code like this:

a. $obj.method ($x + $y) + $z # means $obj.method(($x + $y) + $z) b. $obj.method($x + $y) + $z # means $obj.method($x + $y) + $z c. $obj.method + 1 # means ( $obj.method ) + 1 d. $obj.method +1 # means $obj.method( 1 ) e. $obj.method+1 # an error!

my intuitions and Larry's are obviously seriously mismatched since I'd get (a), (d) and (e) wrong unless I am expending effort to think about it. I've shown it to a few other developers than I know and they all got (a), (d) and (e) wrong too.

Now of course I can learn this syntax (and I'll probably have to :-) and the other interesting bits of Perl 6 mean that I'll still be giving the language some serious consideration - so why carry on about it.

A few reasons:

  • Selfish first - I just don't like it!
  • I don't see that the significant white space increases clarity or conciseness enough to justify the learning curve. The rules seem fairly arbitrary to me (hmmm... maybe this is the last point with more words)
  • I want Perl 6 to be completely perfect and wonderful so I'm willing to spend some effort niggling about the little things :-)
  • The reaction of the developers I explained the white space rules to was unanimous horror. I expect that "it has these completely unintuitative rules for white space" to become part of the standard Perl 6 FUDer's armamentarium .
  • Perl 6 is a lot friendlier than Perl 5 to people coming from other languages except in this area of whitespace. I can't think of another language that has whitespace rules like this so it's going to make the learning curve nastier.
  • It's going to make switching the mental switch between Perl and Ruby/C/Lisp/Eiffel/Whatever and Perl harder for people like me who jump around between languages a fair bit.

Basically every programming language out there has trained my eyes to ignore white space except for indentation. The latter is why I don't mind languages like Python or occam because their white space rules are a match for the informal coding style I'd be using in any other language.

I'm going to have to retrain my eyes for Perl 6.

I'm not looking forward to it because I don't see any major advantage that these rules are going to give me as a developer

(Of course now is the time somebody will point out that there are some really nifty examples hidden in the depths of A12 - which I'll get around to reading properly Real Soon Now - which will probably result in a stupidly huge list of niggly comments that annoy everybody involved :-).

In reply to Re^4: Perl 6 Whitespace Issues by adrianh
in thread How to Sell Perl 6 by Ovid

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others lurking in the Monastery: (4)
    As of 2018-05-27 00:22 GMT
    Find Nodes?
      Voting Booth?