Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

On-the-fly grammer redefintion should not affect the actual way in which the type system works. It might play some tricks on the programmer so that a Str type annotation is turned into a Num type annotation, but while that would be kind of silly, it would not affect the way the underlying type system works.

Actually, Perl 6 will try it's best to be as statically typed as possible, including performing some type inference when there are no programmer written type annotations present. Anything which it cannot figure out during the compile phase, it will leave until runtime (which is fairly common in other "staticly typed" languages like Java, etc.). This combination of compile time static type analysis and runtime type constraint checks is sometimes referred to as a hybrid type system, but once again it is not unique to Perl 6 by any means.

However, this may or may not be what they mean. Perl 6 will also combine a nominal type system (types are compared by names) and a structural type system (types are compared by their defined structure). This could be seen as a hybrid type system too, however this too is not unique to Perl 6 either.

So possibly they mean that Perl 6 is unique becuase it's type system is; as static as it can be and as dynamic as it needs to be, will check types by name if it can or by structure if it needs to, and in the end is entirely optional.

-stvn

In reply to Re^2: Perl 6: Static/Dynamic Strong/Weak Type Systems by stvn
in thread Perl 6: Static/Dynamic Strong/Weak Type Systems by tomazos

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 taking refuge in the Monastery: (6)
As of 2024-04-19 20:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found