On Wed, Oct 19, 2005 at 03:02:14PM +0200, TSa wrote:
: HaloO,
:
: Juerd wrote:
: >Luke Palmer skribis 2005-10-18 11:57 (-0600):
: >
: >>It looks nicer if you use the indirect object form:
: >> trans "string": [
: >>=> "0",
: >> ];
: >
: >
: >It'd also look very nice with optional paren
On Wed, Oct 19, 2005 at 01:48:08PM +0200, TSa wrote:
: HaloO,
:
: Luke Palmer wrote:
: >It looks nicer if you use the indirect object form:
: >
: >trans "string": [
: > => "0",
: >];
:
: Given the right interpretation this just looks like
: a typed label selection in a multi metho
HaloO,
Juerd wrote:
Luke Palmer skribis 2005-10-18 11:57 (-0600):
It looks nicer if you use the indirect object form:
trans "string": [
=> "0",
];
It'd also look very nice with optional parens:
"string".trans [ => "0" ];
Or is it not yet time to resuggest that? :)
I l
HaloO,
Luke Palmer wrote:
It looks nicer if you use the indirect object form:
trans "string": [
=> "0",
];
Given the right interpretation this just looks like
a typed label selection in a multi method.
multi trans
{
Str $x: ...; return;
Int $x: ...; return;
On 10/18/05, Luke Palmer <[EMAIL PROTECTED]> wrote:
>
> Uh, no. Certainly not for a method. For a bare sub that has been
> predeclared it may be possible. But we don't want to remagicalize
> pairs after we just argued the heck out of it to make pairs *always*
> be named parameters.
My thought was
Luke Palmer skribis 2005-10-18 11:57 (-0600):
> It looks nicer if you use the indirect object form:
> trans "string": [
> => "0",
> ];
It'd also look very nice with optional parens:
"string".trans [ => "0" ];
Or is it not yet time to resuggest that? :)
Juerd
--
http://co
On 10/18/05, Eric <[EMAIL PROTECTED]> wrote:
> Currently we (can|will be able to) do
>
> "string".trans( (['h','e'] => "0") );
> "string".trans( <== ['h','e'] => "0");
>
> Those are fine and i can live with that, but it seems that if we made the
> signature of trans
>
> method trans(Str $self: [EMA
I have a suggestion/proposal/whatever.
I am just starting to get a grasp of uses for pairs and where they are
handy. Working on string.trans some showed that it would be useful to have
the function accept a list of pairs. That was working until the fix for
magical pairs went through and now the pa
[EMAIL PROTECTED] (Eric) writes:
>> On Fri, 14 Oct 2005 08:38:55 +0200, Peter Makholm <[EMAIL PROTECTED]>
>> wrote:
>> > Yesterday I spend some hours getting pugs to understand
>> > translitterations with multiple ranges in each pair. E.g.
> Actually its been fixed already. Of course i think the
On 16 Oct 2005 03:46:25 -, David Formosa (aka ? the Platypus) <
[EMAIL PROTECTED]> wrote:
>
> On Fri, 14 Oct 2005 08:38:55 +0200, Peter Makholm <[EMAIL PROTECTED]>
> wrote:
> > Yesterday I spend some hours getting pugs to understand
> > translitterations with multiple ranges in each pair. E.g.
On Fri, 14 Oct 2005 08:38:55 +0200, Peter Makholm <[EMAIL PROTECTED]> wrote:
> Yesterday I spend some hours getting pugs to understand
> translitterations with multiple ranges in each pair. E.g.
>
> "foobar".trans( "a-z" => "n-za-n" );
>
> By accident I tested something like:
>
> "foobar".t
On Fri, Oct 14, 2005 at 05:17:48PM -0700, Larry Wall wrote:
> form of tr/// should always use lists, with a helper function to
> translate "a..z" to a list and also carp about the fact that it will
> break under Unicode. :-)
And EBCDIC.
The dinosaurs are not extinct yet. I guess that they are t
[EMAIL PROTECTED] (Larry Wall) writes:
> : my %transtable;
> : for %intable.kv -> $k, $v {
> : # $k is stringified by the => operator.
>
> Interesting comment. I wonder if it's true.
That was my attempt to explain the observations I did. Clearly I put
the blame the wr
On Sat, Oct 15, 2005 at 01:27:58AM +0200, Juerd wrote:
: Larry Wall skribis 2005-10-14 10:43 (-0700):
: > Actually, it looks like the bug is probably that => is forcing
: > stringification on its left argument too agressively. It should only
: > do that for an identifier.
:
: Would it work to cal
On Fri, Oct 14, 2005 at 08:49:50PM +0200, Peter Makholm wrote:
: The code I'm lookin at is in pugs/src/perl6/Prelude.pm around line 380:
:
: method trans (Str $self: *%intable) is primitive is safe {
:
: my sub expand (Str $string is copy) {
: ...
: }
:
:
Larry Wall skribis 2005-10-14 10:43 (-0700):
> Actually, it looks like the bug is probably that => is forcing
> stringification on its left argument too agressively. It should only
> do that for an identifier.
Would it work to call this process autoquoting, instead of
stringification? I'm assumin
[EMAIL PROTECTED] (Larry Wall) writes:
> On Fri, Oct 14, 2005 at 08:38:55AM +0200, Peter Makholm wrote:
> : Yesterday I spend some hours getting pugs to understand
> : translitterations with multiple ranges in each pair. E.g.
> :
> : "foobar".trans( "a-z" => "n-za-n" );
> :
> : By accident I
On Fri, Oct 14, 2005 at 08:38:55AM +0200, Peter Makholm wrote:
: Yesterday I spend some hours getting pugs to understand
: translitterations with multiple ranges in each pair. E.g.
:
: "foobar".trans( "a-z" => "n-za-n" );
:
: By accident I tested something like:
:
: "foobar".trans( ['a' ..
Yesterday I spend some hours getting pugs to understand
translitterations with multiple ranges in each pair. E.g.
"foobar".trans( "a-z" => "n-za-n" );
By accident I tested something like:
"foobar".trans( ['a' .. 'z'] => "n-za-m" );
and it didn't work.
The problem is that ['a' .. 'z'] gets
19 matches
Mail list logo