Larry Wall wrote:
: Is a closure return type indicated with this siglet syntax, too?
: : sub foo :(Str,Int) of :(Any) {...}

You would need :() only to group multiple siglets into a single type.
So an Any can stand on its own.

Ohh, interessting! I wanted to express a return value type that is a sub that takes an Any as parameter. For you the syntax :() is escaping into type specs like ::() is escaping into namespace. I like this notion as well :)

So we have:

  ( term )
 :( type )
::( name )

My intended declaration of &foo could read:

sub foo :(Str,Int) returns &:(Any) {...}

I also used returns not of for clarity. But of is a synomym for returns
and I find it's more in line with other---ahm---types of types! Actually
for type theorists, Ada and Pascal programmers and similar folk the : as
type indicator is not too far fetched. It even gives them:

my $x :( Int );  #  var x : Int;

But how is the return type of the return type of foo specified?
Is that &:(Any returns Int) and &:(Any of Int)?
Or &:(Any):(Int)?
Or inside &:( Any of &:(Int) )?

We are making progress, but not there yet, I think.
TSa (Thomas Sandla▀)

Reply via email to