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

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

by salva (Canon)
on Apr 16, 2006 at 10:34 UTC ( [id://543629]=note: print w/replies, xml ) Need Help??


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

(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.

  • Comment on Re^2: Perl 6: Static/Dynamic Strong/Weak Type Systems

Replies are listed 'Best First'.
Re^3: Perl 6: Static/Dynamic Strong/Weak Type Systems
by stvn (Monsignor) on Apr 16, 2006 at 13:37 UTC

    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://543629]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-20 02:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found