Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Well, those are all true to some extent in Perl 5 as well. In addition to those reasons, Perl 6 pushes sigils in a direction that makes more sense in the context of human linguistics:
  • Sigils distinguish nouns from verbs, which is especially important when you wish to talk about a verb as a noun. Many human languages require noun markers of some sort or other. (English is interesting in generally requiring plurals to be marked rather than singulars, but there is much linguistic precedent for requiring both.)
  • Sigils distinguish nouns from types and other adverbial notions, which helps the parameters in declarations stand out, and tells the compiler which parts of the declaration are intended as referential and which are intended to declare something new.
  • Your typical noun phrase will contain a single sigil somewhere, and that marks the "head" of a noun phrase. This makes it really easy to figure out where to start reading a noun phrase.
  • The sigils provide a "safe haven" namespace for twigils that mark extraordinary scoping in an immediately recognizable fashion. Unlike sigils, twigils can therefore have an unmarked form for ordinary $foo variables. Otherwise all the twigils would be confusable with prefix operators.
I'm sure I could think of more reasons if I tried, but those are good enough. :-)

In reply to Re^2: Sigils in Perl 6 by TimToady
in thread What's wrong with Perl 6? by duff

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2024-04-26 00:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found