develooper Front page | perl.perl6.internals | Postings from January 2002

Re: strings: "sequence-of-integer ... list of chunks"

Thread Previous
From:
Dan Sugalski
Date:
January 31, 2002 09:37
Subject:
Re: strings: "sequence-of-integer ... list of chunks"
Message ID:
a05101407b87f32489b57@[63.120.19.220]
At 5:34 PM +0000 1/31/02, Tim Bunce wrote:
>On Thu, Jan 31, 2002 at 12:18:28PM -0500, Dan Sugalski wrote:
>>  At 2:49 PM +0000 1/31/02, Tim Bunce wrote:
>>  >On Wed, Jan 30, 2002 at 10:47:36AM -0800, Larry Wall wrote:
>>  >>
>>  >>  For various reasons, some of which relate to the sequence-of-integer
>>  >>  abstraction, and some of which relate to "infinite" strings and arrays,
>>  >>  I think Perl 6 strings are likely to be represented by a list of
>>  >>  chunks, where each chunk is a sequence of integers of the same size or
>>  >>  representation, but different chunks can have different integer sizes
>>  >>  or representations.  The abstract string interface must hide this from
>>  >>  any module that wishes to work at the abstract string level.  In
>>  >>  particular, it must hide this from the regex engine, which works on
>>  >>  pure sequences in the abstract.
>>  >
>>  >I hope someone volunteers to start looking into implementing that soon
>>  >(if no one has already).
>>
>>  Yup, in progress.
>>
>>  There is an issue of time--what do we do, for example, in the case:
>>
>>      my $pi = Pi::Generate;
>>      if ($pi =~ /[a-z]) {
>>        print "There's a letter in here!\n";
>>      }
>>
>>  if Pi::Generate returns a generator object that will calculate pi for
>>  you to however far you want, that regex will run forever or until it
>>  runs out of memory, whichever comes first.
>
>Right. So don't do that.
>
>:-)

Oh, sure, *be* sensible. Sheesh, some people... :)
-- 
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                       teddy bears get drunk

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About