I'm going to YAPC
Darren Duncan
darren at darrenduncan.net
Thu May 30 20:48:31 PDT 2013
On 2013.05.30 8:03 PM, Chip Salzenberg wrote:
> On Thu, May 30, 2013 at 6:58 PM, Reini Urban <reini.urban at gmail.com> wrote:
> What?
> And I seriously thought of proposing making the scalar $ sigil optional.
> It looks bad and is only needed within strings. functions are scalars also,
> so treat them as such.
> Bleach the beast. ruby had a point.
>
> if (b) { a = 12 }
> elsif (b) { a = 14 }
> else { a = sub{ 1 } }
> print a;
>
> A sigil-free mutation of Perl would be a good language, to be sure. Perhaps not
> really Perl, but still good. :) But as I'm sure you'll agree, it's easy to
> mechanically translate between the two dialects, which renders it fundamentally
> uninteresting to VM hackers. And as such I hope never to have to talk about it
> in Austin.
I think if you were going to make a Perl-like language that is sigil-free, where
sigils aren't used to indicate that what it appears with is the name of some
entity in contrast to a keyword or literal, I agree. My preference instead is
to let bare symbolic characters generally be parsed as operators, so for example
a "$foo" means "$" is a unary operator whose argument is "foo", like how "-foo"
is treated (or its an infix depending on context, again like "-"), and likewise
for % and @ etc. In the same context I'd prefer # to be freed up from being a
comment marker and useable as an operator like other symbols, so for example one
can declare unary "#" so eg "#ary" returns the count of elements in "ary". I
like "/* */" for comments as one is unlikely to want an operator like that while
I can see a lot of desire for "#" as an operator. So this wouldn't necessarily
be Perl anymore, but I do that in my Perl-alike language. -- Darren Duncan
More information about the yapc
mailing list