develooper Front page | perl.perl6.language | Postings from May 2007

Re: explicit line termination with ";": why?

Thread Previous | Thread Next
From:
Jonathan Lang
Date:
May 14, 2007 15:28
Subject:
Re: explicit line termination with ";": why?
Message ID:
ef30550b0705141528p3d6353b9ubeaed8a83668deed@mail.gmail.com
Jonathan Lang wrote:
> ^[3]: If this were included in the core, you might even reverse things
> so that ';' is defined in terms of postfix:<.> or infix:{'<=='},
> depending on the context; in this case, postfix:<?> would be defined
> in terms of postfix:<.>, rather than postfix:<;>.  In fact, the only
> thing keeping postfix:<.> from completely replacing postfix:<;> as a
> statement terminator and insisting that the latter always be used as a
> shortcut for feeds is the long tradition that the latter has in
> programming languages - much like perl 6's infix:<.> replaces perl 5's
> '->' because that's what everyone else uses.

Umm, never mind.  I just realized that introducing a postfix:<.>
operator would complicate matters in unexpected ways by forcing
infix:<.> to require disambiguating whitespace, as per S02.  This
would be Very Bad in several ways, e.g., an infixed dot is given as
the appropriate way to separate a postfix operator from the term in
front of it when whitespace is forbidden.  Or the fact that 'foo.bar'
would no longer parse as expected.  :sigh:

-- 
Jonathan "Dataweaver" Lang

Thread Previous | 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