Larry Wall skribis 2005-11-07 13:20 (-0800):
> Okay, I won't shout (not even on PerlMonks :-), but named parameters
> default to optional, so you'd have to write that as
> sub convert (:$from!, :$to!, :$thing!) { ... }
> in the current scheme of things.
Ah, thanks.
I hadn't noticed this chang
On Mon, Nov 07, 2005 at 11:20:39PM +0200, Ilmari Vacklin wrote:
: On Mon, Nov 07, 2005 at 12:05:30PM -0800, Larry Wall wrote:
: > On Mon, Nov 07, 2005 at 11:53:26AM -0800, Larry Wall wrote:
: > : Also, if we provide a way to return a pair instead of a value from a
: > : hash (currently done with th
On Mon, Nov 07, 2005 at 12:05:30PM -0800, Larry Wall wrote:
> On Mon, Nov 07, 2005 at 11:53:26AM -0800, Larry Wall wrote:
> : Also, if we provide a way to return a pair instead of a value from a
> : hash (currently done with the new :%hash syntax),
>
> Whoops, I forgot I changed that to %hash: (an
On Mon, Nov 07, 2005 at 04:46:06PM -0500, Andrew Rodland wrote:
> Sorry, I wasn't clear here, so I hope you don't mind my cutting you off. What
> I meant wasn't "signatures are too much complexity" -- they're not; they're
> simply doing something useful -- but rather "too much complexity is getti
On Monday 07 November 2005 03:51 pm, Juerd wrote:
> Andrew Rodland skribis 2005-11-07 13:30 (-0500):
> > If you want to get into personal beliefs, I think that function
> > signatures are such a complexity quagmire -- and that they're line-noise
> > ugly to boot.
>
> The nice thing about signatures
> Okay, I won't shout (not even on PerlMonks :-), but named parameters
> default to optional, so you'd have to write that as
>
> sub convert (:$from!, :$to!, :$thing!) { ... }
>
> in the current scheme of things.
Either way, the point is still that the benefits FAR outweigh any
additional comp
On Mon, Nov 07, 2005 at 09:51:39PM +0100, Juerd wrote:
: Or let's take this simple example:
:
: sub convert (:$from, :$to, :$thing) { ... }
:
: That isn't quite "my %args = @_;". Yes, that works, but the only real
: way we keep doing it is that the full solution sucks in plain Perl 5:
:
:
Andrew Rodland skribis 2005-11-07 13:30 (-0500):
> If you want to get into personal beliefs, I think that function signatures
> are
> such a complexity quagmire -- and that they're line-noise ugly to boot.
The nice thing about signatures is that they let you write what you
mean. This saves you a
Hi,
Larry Wall wrote:
> On Sun, Nov 06, 2005 at 03:10:40PM +0100, Ingo Blechschmidt wrote:
[ => should not automatically bind its .value to the RHS ]
> I think binding directly to .key or .value is different from what =>
> does. So after
>
> $pair = $key => $value;
>
> setting $value doesn
On Mon, Nov 07, 2005 at 11:53:26AM -0800, Larry Wall wrote:
: Also, if we provide a way to return a pair instead of a value from a
: hash (currently done with the new :%hash syntax),
Whoops, I forgot I changed that to %hash: (and %hash:{'key'} too).
Larry
On Sun, Nov 06, 2005 at 03:10:40PM +0100, Ingo Blechschmidt wrote:
: Hi,
:
: my ($key, $value) = ;
: my $pair = ($key => $value);
:
: $pair.key = "new";
: # Should this fail ("cannot modify a constant")?
: # Should this update $pair.key, but leave $key untouched?
:
HaloO,
Larry Wall wrote:
> : ::Takes3Ints ::= :(Int,Int,Int --> Any);
> :
> : my &foo:(Takes3Ints);
>
> I'd say that has to be something like:
>
> my &foo:(Takes3Ints:);
>
> or maybe one of
>
> my &foo:(Takes3Ints \!);
> my &foo:(\Takes3Ints);
> my &foo\(Takes3Ints);
>
On 2005-11-07 1:30 PM, "Andrew Rodland" <[EMAIL PROTECTED]> wrote:
> Especially when that complexity isn't optional. I
> think that's really a common "fear", that Perl 6 is going well beyond that
> point of sensibility.
>
> If you want to get into personal beliefs, I think that function signatures
On Mon, Nov 07, 2005 at 09:37:04AM -0800, Larry Wall wrote:
: It would be nice to generalize this sufficiently to be able to declare
: polymorphic objects resembling match objects:
:
:my $matchobj(Poly: Key^Int^Notthere --> Any);
:
: Or maybe that should be:
:
:my $matchobj\(Highlander)
On Monday 07 November 2005 09:26 am, Rob Kinyon wrote:
> On 11/7/05, Michele Dondi <[EMAIL PROTECTED]> wrote:
> > On Fri, 4 Nov 2005, Rob Kinyon wrote:
> > > So, for a bit of extra complexity, I get peace of mind for myself and
> > > my users.
> >
> > The point being, and I'm stressing it once agai
On Mon, Nov 07, 2005 at 01:05:16PM +0100, TSa wrote:
: With the introduction of kind capture variables ^T we could complety
: drop the subtype special form. As you pointed out the adding of constraints
: happens with the where clause anyway. Thus we return to the usage of the
: compile time name as
On 11/7/05, Michele Dondi <[EMAIL PROTECTED]> wrote:
> On Fri, 4 Nov 2005, Rob Kinyon wrote:
>
> > So, for a bit of extra complexity, I get peace of mind for myself and my
> > users.
>
> The point being, and I'm stressing it once again but no more than once,
> that maybe we're adding two bits of ex
On Fri, 4 Nov 2005, Juerd wrote:
Whatever, the new system by contrast seems to me to be at least 400%
more complex, but it won't buy me 400% more functionality.
It will buy you 400% in saving typing, 4000% in less debubbing and
4% in maintainability(==readability).
Of course drawing any
HaloO,
Larry Wall wrote:
: or is 'bound of' proper english?
It doesn't really resonate for a native speaker.
--snip--
: > Plus, as we've defined
: >them above, subtypes are the most generic type you can name in Perl.
--snip--
I wasn't using the term "generic" in a type-theoretic sense.
HaloO,
Stevan Little wrote:
This is actually the principe behind the Ruby style singleton methods
(the shadow class), it basically creates an anon-class which inherits
from $x's original class, then it rebinds/blesses $x into the anon-
class. It is very simple really :)
Yes, it's the typic
20 matches
Mail list logo