More!
can you have several slurpy params, of the same type, which are
assigned contiguous sequences of the thing they can slurp?
foo([EMAIL PROTECTED], *%a, [EMAIL PROTECTED])
foo(1, 2, 3, a => b, c => d, 4, 5, 6);
for me that makes sense for slurpy blocks, but not anyth
On Wed, Mar 23, 2005 at 11:53:06 -0800, Larry Wall wrote:
> On Wed, Mar 23, 2005 at 05:43:52PM +0200, Yuval Kogman wrote:
> : The algorithmic approach to binding some params:
> :
> : bind invocants
> :
> : bind named parameters, and keep leftover pairs for %_
> :
> : treat nonpairs a
On Wed, Mar 23, 2005 at 08:24:48PM +0200, Yuval Kogman wrote:
: On Wed, Mar 23, 2005 at 17:43:52 +0200, Yuval Kogman wrote:
: > Hola... I've spend some time these last few days slowly getting
: > currying to work in pugs.
:
: It should also be mentioned that I made magical $?SUB et al unbind
: the
HaloO Larry,
you wrote:
: class Str[ ::T does StringNumification ]
: {...}
And then, based only on what you've written there, we need to teach
people all about classes, parameterized types, representational types,
constraints, formal type parameters, and roles before they can begin
to write the rad
On Wed, Mar 23, 2005 at 05:43:52PM +0200, Yuval Kogman wrote:
: The algorithmic approach to binding some params:
:
: bind invocants
:
: bind named parameters, and keep leftover pairs for %_
:
: treat nonpairs as positionals, and bind them sequentially. Left
: over nonpair
On Wed, Mar 23, 2005 at 07:33:43PM +0100, Thomas Sandlaß wrote:
: Larry Wall wrote:
: >So we should probably
: >have a generalized radix_to_dec($radix,$input) function out there
: >somewhere instead.
:
: Why not shift it onto the type system:
:
: my Int $i = $input as Str[$radix] as Int;
:
: A b
On Wed, Mar 23, 2005 at 11:14:16AM -0500, Stevan Little wrote:
: Is subst an object/type?
: Or is it a method of the Str object?
I suspect it's just a method, and the ~~ binding of s/// is merely
syntactic sugar for the method call.
: If it is an object ...
:
: Does s/// produce a su
Larry Wall wrote:
So we should probably
have a generalized radix_to_dec($radix,$input) function out there
somewhere instead.
Why not shift it onto the type system:
my Int $i = $input as Str[$radix] as Int;
A bit lengthy but quite clear.
And easy to extend e.g. to roman numerals:
say "VII" as Str[Ro
On Wed, Mar 23, 2005 at 17:43:52 +0200, Yuval Kogman wrote:
> Hola... I've spend some time these last few days slowly getting
> currying to work in pugs.
It should also be mentioned that I made magical $?SUB et al unbind
the sub.
In a curried sub, should that happen?
It looks more consistent for
On Wed, 2005-03-23 at 12:58, Larry Wall wrote:
> :2<1000_>
> :10<1_000_000>
Two things:
1. Just a note that Pugs doesn't yet do _ in numbers, but should
2. I'd really like to see a warning on non-standard _ breaks, e.g;
1_00_000
should issue a warning.
> Interestingly,
Larry Wall wrote:
my @array of Int;
is really short for
my @array is Array of Int;
How does 'is' relate to 'does'? I mean is the above @array
ready for operation? Whilst
my @array does Array of Int;
still needs a compatible object to be put into @array?
Like so:
class Blubber does Array of
On Wed, Mar 23, 2005 at 03:28:31PM +, Peter Haworth wrote:
: On Mon, 21 Mar 2005 08:41:27 -0800, Larry Wall wrote:
: > Okay, I've come around to liking it, but I think we have to say that
: > 0x, 0d, 0o, 0b, and whatever else we come up with are just setting
: > the default radix. If a string c
Hola... I've spend some time these last few days slowly getting
currying to work in pugs.
L states: "takes a series of named arguments"
The way binding is implemented in pugs does not seem to require
limiting that usage case. We have 2 functions, that operate on a
subroutine (which knows it's par
On Mon, 21 Mar 2005 08:41:27 -0800, Larry Wall wrote:
> Okay, I've come around to liking it, but I think we have to say that
> 0x, 0d, 0o, 0b, and whatever else we come up with are just setting
> the default radix. If a string comes in with an explicit 0x, 0d, 0o,
> or 0b, we believe that in prefer
[EMAIL PROTECTED] wrote:
pugs too lazy
Miroslav Silovic noticed that closing a file handle in pugs did not
force all the thunks associated with the file. While this was a bug in
pugs, it led to conversation about whether = should be lazy or eager.
Larry thinks that it will be safer to
At the moment I'm trying to see if I could get used to ..method meaning
$_.method, and whether it buys me anything psychologically.
At some point, adding another thing people have to remember in order to
save one character gets a bit self-defeating, surely.
The good thing about $_.method is that
16 matches
Mail list logo