Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Perl 6: Static/Dynamic Strong/Weak Type Systems

by eyepopslikeamosquito (Archbishop)
on Apr 16, 2006 at 05:31 UTC ( [id://543618]=note: print w/replies, xml ) Need Help??


in reply to Perl 6: Static/Dynamic Strong/Weak Type Systems

I remember Audrey Tang mentioning that the Perl 6 type system has been influenced by the Dylan programming language, in which "Programs can be written on a continuum from fully dynamically typed to fully statically typed". So I guess Dylan could also be classified as "hybridly typed". When you stated that Perl 6 is the only language classifed as hybridly typed, I assume you are referring to this link: wikipedia Type System (next time, please provide the link you are referring to). Though this link classifies Lisp as dynamically typed, it does not explicitly mention the (Lisp-derived) Dylan.

Replies are listed 'Best First'.
Re^2: Perl 6: Static/Dynamic Strong/Weak Type Systems
by salva (Canon) on Apr 16, 2006 at 10:34 UTC
    (Common) Lisp also supports type declarations that may be used by the compiler to generate optimized code.

    I had always though that Perl6 is comming so close to Common Lisp that instead of writting a virtual machine like Parrot and a Perl6 to Parrot compiler, it would be much easier to write a Perl6 to Common Lisp translator and run it on top of a free Lisp environment like CMUCL.

      There was actually some talk of a CL backend for Perl 6, especially given the CLOS-like direction the metamodel has taken. However, CL's type declarations are mostly just hints for the compiler, and (as the spec says) the behavior is largely undefined when a value that does not match the type is assigned to a variable with an attached type declaration. In effect (from what I can deduce) this means there is no actual type "checking" in CL.

      But regardless of this, since everything in Perl 6 will be an object, we basically thought of building it on top of CLOS. But alas, LISP has long suffered from several competing incomplete implementations and we could not find one with good enough (and fast enough) CLOS support to do this.

      -stvn
        In effect (from what I can deduce) this means there is no actual type "checking" in CL.

        I think this is implementation dependant, for instance, on CMUCL types are strictly checked.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://543618]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-03-29 01:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found