On Mon, Jul 09, 2001 at 04:43:28PM +1000, Jeremy Howard wrote:
> One of mjd's points about mashed potatoes is that Perl isn't ML, and ML's
> typing approach doesn't fit on top of Perl very well (i.e. at all).

Well, my hope is somehow we can get types to be a bit more implicit
than the usual mess most people are used to.


> Stroustrup noticed the same thing (about typing, not mashed potatoes) when
> looking at this issue for C++. His solution was the introduction of
> 'templates':

YeeeAHHH!!  Don't say that word!!  I'll have nightmares now.


> Because templates provide much-needed flexibility in algorithm and class
> development, C++ programmers don't have to use many of the workarounds that
> mjd identified.

Yes, they have lots of different work arounds. ;)


> Perl 5 didn't need templates, because there wasn't compile-time typing. But
> with Perl 6 I want to send my compact array of integers to the same fast
> sum() function as my compact array of floats, and not have to wait while
> perl treats them both as old generic scalars. That means that my sum()
> function needs a typed parameter list. There seems to be at least two
> potential solutions:
>  - Provide a type placeholder in the parameter list (a la C++ function
> templates)
>  - Provide a type hierarchy for all types (a la Haskell)

I think a type hierarchy makes much more sense than unleashing the hell
of templates on Perl.


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <[EMAIL PROTECTED]>       Kwalitee Is Job One
Maybe they hooked you up with one of those ass-making magazines.
        -- brian d. foy as misheard by Michael G Schwern

Reply via email to