Front page | perl.perl6.language |
Postings from July 2005
Re: Raw bytes in perl6
Thread Previous
|
Thread Next
From:
Yuval Kogman
Date:
July 12, 2005 14:47
Subject:
Re: Raw bytes in perl6
Message ID:
20050712214649.GA28484@woobling.org
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 <nothingmuch@woobling.org> 0xEBD27418 perl hacker &
/\ kung foo master: /me has realultimatepower.net: neeyah!!!!!!!!!!!!
Thread Previous
|
Thread Next