develooper Front page | perl.perl6.language | Postings from April 2006 or long dot and the range operator

Thread Next
April 11, 2006 03:41
Subject: or long dot and the range operator
Message ID:

I'm unsure what the outcome of the recent long dot discussions is
as far as the range operator is concerned. Since the whole point
of the long dot is to support alignment styles the following cases
shouldn't mean different things:

    foobar     #0  single call to foobar (OK, that is different)    #1  method .bar on retval of foo   #2  range from retval of foo to retval of bar?
    foo. .bar  #3  same as #1

    $x++       #0
    $x.++      #1
    $x..++     #2  or: $x. ++?
    $x. .++    #3

    foo()      #0
    foo.()     #1
    foo..()    #2
    foo. .()   #3

Are all the #2 cases valid syntax? Does the range operator
need whitespace then? Or is there a hole for spacing level 2?

BTW, the above dot sequences let the successions of long dots
look like a wedge, so there are some merits in the idea.
But isn't forced whitespace on the range too high a price?

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About