On Tue, Oct 25, 2005 at 02:02:58PM -0500, Jonathan Scott Duff wrote:
> On Tue, Oct 25, 2005 at 12:18:41PM -0600, Luke Palmer wrote:

<snip examples from luqui of type variables being used multiple times
with and without sigils>

> I don't think so. In the first example all the T (or ¢T) are the same
> type after the first ¢T (where the type is bound). In the second one
> you'd get two separate types ¢T and ¢U. But ¢U would probably get bound
> to the same type as ¢T as that's the type of thing that it returns
> (assuming perl can figure that out).

We have (or have had?) parameterised classes where you can specify
parameters to the class enclosed in [].

eg. class Foo[...] { ... }

So couldn't the same be used for functions?  This way you wouldn't need
a special sigil for classes declared in such a way.

sub foo[Bar] (Bar $tab) { ... }

Since perl6 isn't really a static language, I don't think you need to be
allowed to have non-type variables in the [] (dependent-typing, or where
you can use primitive types like int in template parameters in C++),
since being parameters in [] means only that they're types, and not that
they are always bound at compile time.

(apologies for breaking the unicode)

-- 
Benjamin Smith <[EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]>
Christ's College - Mathematics Part 1B
IRC: integral on irc.perl.org, and irc.freenode.net (channel: #perl)

Reply via email to