.split(//)

0 views
Skip to first unread message

Илья

unread,
Sep 16, 2008, 12:23:17 PM9/16/08
to novemb...@googlegroups.com
Hi,
split do not work properly with regex.
I search for tickets about that, but do not see.
Can you give my link if it exists? I want to add number to RAKUDO:...
comments.

Ilya

Moritz Lenz

unread,
Sep 16, 2008, 12:47:31 PM9/16/08
to novemb...@googlegroups.com

http://rt.perl.org/rt3/Ticket/Display.html?id=57378

I tried to implement it once, and couldn't even install a multi that
would be called on "abc".split(/b/)

String handling is rather confusing because there are Perl6Str, String
and Str around, and I don't know how they are related.

Moritz

--
Moritz Lenz
http://moritz.faui2k3.org/ | http://perl-6.de/

Patrick R. Michaud

unread,
Sep 16, 2008, 2:09:35 PM9/16/08
to novemb...@googlegroups.com
On Tue, Sep 16, 2008 at 06:47:31PM +0200, Moritz Lenz wrote:
> String handling is rather confusing because there are Perl6Str, String
> and Str around, and I don't know how they are related.

String is Parrot's built-in string type.

Perl6Str is a subclass of String -- it basically exists so that we
can get the correct numification semantics from Strings.
It's written in C because:
1. numification is a frequent operation
2. it's easier to write this in C than in PIR

Str is the official Perl 6 string type, it is a subclass of
Perl6Str and Any.

There are a few places in the PIR builtins that create Perl6Str objects
manually because we want to make sure that if the strings are numified
they do so according to the Perl 6 semantics instead of the Parrot ones.
Ultimately most of these will be handled by HLL type mapping, so it
won't be necessary to explicitly coerce things into Perl6Str or Str.

Pm

Reply all
Reply to author
Forward
0 new messages