Arc Forumnew | comments | leaders | submitlogin
3 points by stefano 5473 days ago | link | parent

They're still deprecating stuff after every release, and the following month deprecated stuff is removed.

All languages on Parrot compile down to a common denominator, Parrot's assembly language (PIR), either dynamically at run time or before execution. It has an object system and common function call conventions, this means that as long as a language supports calling functions and a compatible object system (or some wrappers around it) it can call any function and use any object as other languages running on the VM. Arc doesn't have an object system, so some wrapper would be needed. To get seamless interoperability the language implementation should define a mapping between the language's primitive types and the corresponding Parrot's types. Primitivearc currently lacks the wrappers around the object system to interoperate with object oriented libraries (adding them wouldn't be a huge task I think), but it can already call any function loaded into the VM. To call a Perl 6 function (this doesn't work because 'load assumes an Arc file but it could be easily modified to call the correct compiler, since the mechanism is already present in Parrot):

  file foo.p6:
    sub foo(%tb) {
      return %tb{"bar"};
    }

  Arc REPL:
    > (load "foo.p6")
    #<function>
    > (foo (listtab '((bar "Baz!"))))
    "Baz!"


1 point by s-phi-nl 5473 days ago | link

Conanite's Rainbow has a wrapper around the Java object system that you might want to look at.

-----