Re: Sun Fortress and Perl 6

2005-04-30 Thread Leopold Toetsch
Autrijus Tang [EMAIL PROTECTED] wrote: my sub get_book () of Hash of Array of Recipe {...} my num @nums = Array of num.new(:shape(3;3;3)); Does Parrot's MMD carry this type information natively? Neither of above. But: multi sub foo(Int $a, Num $b) { ... } aka .sub foo

Re: Sun Fortress and Perl 6

2005-04-30 Thread Autrijus Tang
On Sat, Apr 30, 2005 at 08:41:52AM +0200, Leopold Toetsch wrote: Anyway Parrots MMD system depends on types. *If* the Perl6 compiler defines above array as cl = subclass FixedFloatArray, num_Array_shape_3_3_3 Yes, that is what I am planning to emit for hierarchical and other subtyped

Re: Sun Fortress and Perl 6

2005-04-29 Thread Thomas Sandlaß
Autrijus Tang wrote: 1. Type variables as role parameters [..] Curiously, A12 and S12 already allows something like that: role List[Type $t] { method first() returns ::($t); method rest() returns List[::($t)]; method cons(::($t) $x) returns List[::($t)]; method

Re: Sun Fortress and Perl 6

2005-04-29 Thread Aaron Sherman
On Wed, 2005-04-27 at 09:46, Matt wrote: On Wed, 27 Apr 2005 03:32:12 -0400, Autrijus Tang [EMAIL PROTECTED] wrote: 3. Labels applies to blocks, not statements [...] I've missed out on some Perl6 stuff, so excuse me as this was probably already discussed. Does that mean this is

Re: Sun Fortress and Perl 6

2005-04-29 Thread Aaron Sherman
On Wed, 2005-04-27 at 03:32, Autrijus Tang wrote: (via http://lambda-the-ultimate.org/node/view/673 ) LtU is a great site, BTW, I highly recommend it to anyone interested in languages. There are a few things in that spec, though, that makes me wonder if Perl 6 should have it too: [...]

Re: Sun Fortress and Perl 6

2005-04-29 Thread Autrijus Tang
On Fri, Apr 29, 2005 at 08:33:56AM -0400, Aaron Sherman wrote: Currently per S09, Perl 6 collection types all have uniform types, so one has to use the `List of Any` or `Array of Any` return type instead. That seriously hinders inference and typechecking; however, I wonder if it is a

Re: Sun Fortress and Perl 6

2005-04-29 Thread Aaron Sherman
On Fri, 2005-04-29 at 08:54, Autrijus Tang wrote: On Fri, Apr 29, 2005 at 08:33:56AM -0400, Aaron Sherman wrote: Currently per S09, Perl 6 collection types all have uniform types, so one has to use the `List of Any` or `Array of Any` return type instead. That seriously hinders inference

Re: Sun Fortress and Perl 6

2005-04-29 Thread Autrijus Tang
On Fri, Apr 29, 2005 at 02:35:26PM -0400, Aaron Sherman wrote: Sure, but Parrot is not the compiler, it's just something I need to target. Hierarchical signature checking should probably not be done in the VM level. How do other languages call P6 subroutines and methods? Parrot has a

Re: Sun Fortress and Perl 6

2005-04-27 Thread Autrijus Tang
On Wed, Apr 27, 2005 at 08:21:27AM -, Rafael Garcia-Suarez wrote: Autrijus Tang wrote in perl.perl6.language : 4. Software Transaction Memory In Fortress, there is also an `atomic` trait for functions, that declares the entire function as atomic. Interesting; and this rolling-back

Re: Sun Fortress and Perl 6

2005-04-27 Thread Juerd
Autrijus Tang skribis 2005-04-27 17:04 (+0800): I can certainly see a `is pure` trait on Perl 6 function that declares them to be safe from side effects. In a sense, `is const` also does that. `is pure` would be great to have! For possible auto-memoization of likely-to-be-slow subs it can be

Re: Sun Fortress and Perl 6

2005-04-27 Thread Luke Palmer
Juerd writes: Autrijus Tang skribis 2005-04-27 17:04 (+0800): I can certainly see a `is pure` trait on Perl 6 function that declares them to be safe from side effects. In a sense, `is const` also does that. `is pure` would be great to have! For possible auto-memoization of

Re: Sun Fortress and Perl 6

2005-04-27 Thread Paul Johnson
On Wed, Apr 27, 2005 at 01:53:11AM -0600, Luke Palmer wrote: Juerd writes: Autrijus Tang skribis 2005-04-27 17:04 (+0800): I can certainly see a `is pure` trait on Perl 6 function that declares them to be safe from side effects. In a sense, `is const` also does that. `is pure`

Re: Sun Fortress and Perl 6

2005-04-27 Thread Matt
On Wed, 27 Apr 2005 03:32:12 -0400, Autrijus Tang [EMAIL PROTECTED] wrote: 3. Labels applies to blocks, not statements Instead of this: LABEL: say Hello! say Hi! One has to write this (essentially creating named blocks): LABEL: { say Hello! say Hi! }

Re: Sun Fortress and Perl 6

2005-04-27 Thread Sam Vilain
Luke Palmer wrote: `is pure` would be great to have! For possible auto-memoization of likely-to-be-slow subs it can be useful, but it also makes great documentation. It's going in there whether Larry likes it or not[1]. There are so incredibly many optimizations that you can do on pure functions,