Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion get_pmc_keyed() in PerlString?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Sterling Hughes  
View profile  
 More options Dec 3 2003, 6:49 am
Newsgroups: perl.perl6.internals
From: sterl...@project-pint.org (Sterling Hughes)
Date: Tue, 2 Dec 2003 21:04:15 +0100
Local: Tues, Dec 2 2003 3:04 pm
Subject: get_pmc_keyed() in PerlString?
Hey,

I'm right now looking at getting a proper implementation of array/string
offsets done for the PHP compiler.

Here's the problem, in PHP you can access indices of both string's an
array's in the same way, meaning:

<?php
$foo = "hallo johnny";
echo $foo[1]; // "a"
?>

Is just as valid as:

<?php
$foo = array("a", "b", "c");
echo $foo[1]; // "b"
?>

To have this available easily using Perl's types, get_pmc_keyed() would
need to be implemented in the PerlString PMC.  Currently (for the sake
of nice looking mandelbrot demos), we just assume is a native string and
do the offset from that string (which parrot/imc does support.)

Should PerlString support a get_pmc_keyed() method (according to Perl
5/6 semantics), or is this a point where its about time to start implementing
our own PMCs?

-Sterling


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.