Re: Type system questions.

2005-05-04 Thread Larry Wall
On Tue, May 03, 2005 at 09:53:59PM +0800, Autrijus Tang wrote: : On Tue, May 03, 2005 at 05:32:44AM -0700, Larry Wall wrote: : > : # Type Instantiation? : > : sub apply (&fun<::a> returns ::b, ::a $arg) returns ::b { : > : &fun($arg); : > : } : > : > The first parameter would be &fun

Re: Type system questions.

2005-05-03 Thread Thomas Sandlaß
Autrijus Tang wrote: On Tue, May 03, 2005 at 05:32:44AM -0700, Larry Wall wrote: : # Type Instantiation? : sub apply (&fun<::a> returns ::b, ::a $arg) returns ::b { : &fun($arg); : } The first parameter would be &fun:(::a) these days, but yes. (Stylistically, I'd leave the & off t

Re: Type system questions.

2005-05-03 Thread Autrijus Tang
On Tue, May 03, 2005 at 05:32:44AM -0700, Larry Wall wrote: > : # Type Instantiation? > : sub apply (&fun<::a> returns ::b, ::a $arg) returns ::b { > : &fun($arg); > : } > > The first parameter would be &fun:(::a) these days, but yes. > (Stylistically, I'd leave the & off the call.

Re: Type system questions.

2005-05-03 Thread Larry Wall
On Tue, May 03, 2005 at 05:06:15PM +0800, Autrijus Tang wrote: : With the recent discussion on type sigils, and the fact that Pugs : is moving toward the OO core, I'd like to inquire how the following : statements evaluate (or not): : : # Compile time type arithmetic? : ::Dual ::= ::Str |