develooper Front page | perl.perl6.language | Postings from April 2006

foo..bar or long dot and the range operator

Thread Next
From:
TSa
Date:
April 11, 2006 03:41
Subject:
foo..bar or long dot and the range operator
Message ID:
443B87DA.1040800@orthogon.com
HaloO,

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)
    foo.bar    #1  method .bar on retval of foo
    foo..bar   #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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About