On Tue, Jul 12, 2005 at 13:55:56 -0700, Larry Wall wrote: > On the other hand, if the basic Str type is unwilling to take on the > burden of being parameterized, we could generate all our funny string > types by mapping a string name to an array declaration. > > my Str $foo is Array of byte; > > or some such. But maybe we can make Str of byte mean that by way > of shorthand
If this means that the string role, composed with the array role is just a way to apply a bunch of really cool operations (rules, substringing, composition, conversion) onto a stream of things that know to do the Char role, can we have monads too? ;-) Seriously though, haskell's way of treating strings as lists make strings useful in a totally different way than perl5 makes them useful, and I'd like to have both. Perhaps the most interesting aspect of the string-is-a-list mindset is that Parsec can parse any list of crap into any structured crap. It's only affinity towards real strings and characters is the builtin library of useful rules. -- () Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker & /\ kung foo master: /me has realultimatepower.net: neeyah!!!!!!!!!!!!
pgp54WMN4RUfZ.pgp
Description: PGP signature