).
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
of complexity as Filter::Simple,
except with much finer control and more correctness.
I'm not the best person to answer this though.
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpGuOUMaC21l.pgp
Description: PGP signature
interpolations as things stand? E.g., is
there a way to add meaning to backslashed characters in a string that
would normally lack meaning?
You can subclass the grammar and change everything.
Theoretically that's a yes =)
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org
by this far using some online tutorial.
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpIQKKbvB8dY.pgp
Description: PGP signature
with it and make
it bloat.
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpNgghKAUJR3.pgp
Description: PGP signature
the
closed over variables would be cool.
This keeps things concise and lightweight, but does add the ability
to inspect (via a well defined api) what a closure is encapsulating,
etc.
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpiHn7ODKbF4.pgp
Description
a new sequence.
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgplPyMaquTyx.pgp
Description: PGP signature
;
sub foo { say ++$x;
}
BEGIN {
foo();
moose();
foo();
}
foo();
moose();
foo();
*foam oozes out of ears*
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
On Wed, Nov 22, 2006 at 18:55:15 +0100, Juerd wrote:
Yuval Kogman skribis 2006-11-22 16:01 (+0200):
my $x ::= 3;
sub foo { say ++$x };
Why would you be allowed to ++ this $x? It's bound to an rvalue!
Perhaps my $x ::= BEGIN { Scalar.new( :value(3) ) }
What we
is a
warning or an error.
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpZuk0rgo5oy.pgp
Description: PGP signature
is like a declaration putting the closure in some
global, and doesn't actually happen at runtime.
Otoh
for 1,2 - $x {
state $y = $x;
END { say $y }
}
Might work
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
What about str? Or is it called buf now?
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpaF4yq94mUW.pgp
Description: PGP signature
make you do.
Of course, we could use the Email::Abstract interface as a base-
class to all email related modules, but you know that this wouldn't
work for the Perl community...
Base classes, as opposed to roles, don't work well at *all* for
these types of scenarios.
--
Yuval Kogman [EMAIL
is invoking the methods must explicitly
say which behavior it prefers.
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpZ2Gw5Yibt7.pgp
Description: PGP signature
is shiny
but everybody wants the colon:
foo( ( $x :: Moose ) );
If we do find something (please ignore the fact that :: is probably
not going to be the syntax), are these two the same?
my $x = ( $y :: Moose );
my Moose $x = $y;
--
Yuval Kogman [EMAIL PROTECTED]
http
On Tue, Aug 08, 2006 at 11:12:11 +0100, Daniel Hulme wrote:
I may be in a little world of my own here, but isn't this what 'as' is
supposed to do?
foo($x as Moose);
as is a method invocation not a type annotation... It's related, but
not the same (last I heard)
--
Yuval Kogman [EMAIL
, but again, hard to encourage on a wide scale.
Oh, and hello everyone. Long time no see :-)
Welcome back =)
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpdqdaI70kz3.pgp
Description: PGP signature
Actually this particular example is just like coercion, and it's a
bad one sorry.
It's much more relevant for:
fun( $x.foo :: Bar );
in order to annotate the return type for a call's context even if
the 'fun' function's signature accepts Any.
--
Yuval Kogman [EMAIL PROTECTED
On Tue, Aug 08, 2006 at 11:35:30 +, Luke Palmer wrote:
On 8/8/06, Yuval Kogman [EMAIL PROTECTED] wrote:
I personally prefer delegates for almost any design dillema, but
most CPAN modules aren't that way.
Well, what way are they?
Usually not polymorphic at all.
We have the capabilities
role so errors will be caught quickly. It is also
annotation-agnostic.
Hmm... Are the 'adapts' things actual class bodies? Like an inner
class?
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpt3fkl5vE9I.pgp
Description: PGP signature
it is going to fail only if we consider the
return type
http://colabti.de/irclogger/irclogger_log/perl6?date=2006-08-08,Tuesel=359#l545
for more discussion.
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpbTNX1bN0Zz.pgp
Description: PGP signature
. they're more classes to write
3. they're harder to use
Consequentially we have fairly few delegate based APIs for these
problems (Email:Abstract is the only one I know).
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpsRApD6diiG.pgp
Description: PGP
my @deep = $meta.compute_all_attributes; # deep, also from superclasses
Than
my @attrs = $meta.attrs;
my @deep = $meta.compattrs;
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpVoL9QodN0W.pgp
Description: PGP signature
to use Data::Compare, or to overload either ==
or eq, neither of which is a perfect fit.
I have to catch my flight, so I'll explain more later.
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgp4zdMSoN13m.pgp
Description: PGP signature
allow that, but it has nothing to do
with the language it might not even be faster.
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgp2roLoyDefj.pgp
Description: PGP signature
into =:= (a trivial case) and stops.
( 1, 2.0, 3 ) === ( 1,2,3 )
True or false?
false
More imprtantly, how do I tell perl what I mean? The best I can think of is:
[] (@a »==« @b)
Vs
[] (@a »eq« @b)
Neither - it's on the natural types. If the types are different it's
!=
--
Yuval
comparison. There is no need to try to generate some kind of unique
numerical .id for arbitrarily complex objects.
That creates a mess - sometimes objects compare themselves based on
their value, and sometimes based on their containing slot. These are
very different semantics.
--
Yuval Kogman
feel to it
4. =:= is rarely useful IMHO, so you can just type
variable($x) =:= variable($y)
Ciao
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpU0Qe5CPlhQ.pgp
Description: PGP signature
that will actually run the ~~ for me,
in some way, and i'd like 100% compatibility.
Also, sometimes i am matching on behalf of my caller, this is very
common in dispatch algorithms, or things like tree visitors:
my @list = $tree.filter_children( $match ); # very generic and useful
--
Yuval
On Thu, Jul 13, 2006 at 12:50:19 -0700, Larry Wall wrote:
On Thu, Jul 13, 2006 at 09:32:08PM +0300, Yuval Kogman wrote:
: [1] My preferred ergonomics:
:
: 1. eqv goes away
: 2. what was eqv is renamed to ===
: 3. === becomes =:=, which has a constant feel to it
: 4
=== ~$y
}
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgp3B4GnByYFK.pgp
Description: PGP signature
, and it could cache checksums and it could do
whatever - please don't bring this up as a performance issue, it is one of
correctness and ergonomics that must be resolved first.
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpI98L8HHVih.pgp
Description: PGP
without introducing new complexity to the objects being compared as
strings/numbers.
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpefrROP9pJ6.pgp
Description: PGP signature
be true, the fourth should be false, the fifth should be
false, and the sixth should be false.
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpNFsdSOd2Lf.pgp
Description: PGP signature
, and it doesn't even work for
my $x := $array[3];
$x =:= $array[3];
but i'll pretend you didn't say that ;-)
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpPMmzta8SWk.pgp
Description: PGP signature
ref gets it as an argument it's a match!
That's why ~~ isn't a comparison operator, but a smart match
operator - it DWIMs *very* deeply.
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpyx4u1552HO.pgp
Description: PGP signature
memory, here. Some implementations of Perl 6 might
not know what memory looks like (on a sufficiently abstract VM).
Slot
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpvVdjsJ0Et9.pgp
Description: PGP signature
wrapper around a more partitioned set of APIs, that provides a more
toolchain like approach, and keeps the docs together.
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpa4KWeuv2pQ.pgp
Description: PGP signature
.
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpOth0jMRVt0.pgp
Description: PGP signature
On Sun, Jun 18, 2006 at 18:08:00 +1200, Sam Vilain wrote:
Why would you not use .does or .isa there? Are you wanting this
to go through all of the Class/Role's methods and check that the
$object.can() them?
Because if you don't control $object's class you can't change it.
--
Yuval Kogman
compile time verification
}
without affecting our hard earned renewed purity of .isa and .does
(due to roles in Perl 6).
Comments?
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpuJ14rwywVH.pgp
Description: PGP signature
;
$foo.bar;
$ba.:bar;
$x. :bar;
Frankly I don't think there's *that* much of a difference - each has
pros and cons.
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpWe4XRnb3kg.pgp
Description: PGP signature
that message (with full headers) to [EMAIL PROTECTED]
who will then apply the LART.
As I figure I'm about to get one, I'll (also) forward mine.
Just got one...
By LARTing you mean forcibly unsubscribing? because the message was
sent to me directly too...
--
Yuval Kogman [EMAIL PROTECTED]
http
On Sat, Apr 29, 2006 at 19:03:28 -0700, chromatic wrote:
Two invisible things look completely different to you?
If dots looked like this:
then they would be invisible.
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgplPt8CiApME.pgp
Description: PGP
?
If just grep that means that grep simply doesn't use want.
If it's any function, then it means that all are constants are
list or whatever, and all we really have are coercers.
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpOSjPzPmwDK.pgp
Description: PGP
to think (== good for when you are
evaluating a fucntion ref and you don't know what it is, but you
want the natural value to be returned).
b. writing eval bots and interactive shells:
(whatever eval $expr).perl;
;-)
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org
On Sun, Apr 02, 2006 at 02:04:07 +0300, Larry Wall wrote:
^^^-- (actually that was IDT in the headers)
Hi,
I'm in Israel and Japan at the same time!
Nice one though ;-)
plugIf you guys would have participated in the keysigning
parties.../plug
--
Yuval
}
# $x is 5 again
and otherwise pretty much DWIMs, except from a historical
perspective.
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpqVi7l1FtDo.pgp
Description: PGP signature
On Mon, Mar 27, 2006 at 14:35:52 -0600, Jonathan Scott Duff wrote:
On Mon, Mar 27, 2006 at 05:26:48PM +0200, Yuval Kogman wrote:
How did $x become 10?!?!? :-)
GHC has this lovely error: my brain just exploded
I think Perl 6 should have a similar runtime warning about how it's
usiong my short
On Mon, Mar 27, 2006 at 14:54:05 -0600, Jonathan Scott Duff wrote:
Make me believe your 90/10 numbers.
http://cpansearch.bulknews.net/ is broken right now... =(
--
Yuval Kogman [EMAIL PROTECTED]
http://nothingmuch.woobling.org 0xEBD27418
pgpCMeQfldQFY.pgp
Description: PGP signature
entries have a catch block.
The other thing is to be able to trace an exception: if we have 'die
foo but traced' then the exception should print cought at
rethrowed as it's doing that.
This second thing is much harder for me to pretend to implement
--
() Yuval Kogman [EMAIL PROTECTED
On Thu, Mar 23, 2006 at 08:14:03 -0800, Larry Wall wrote:
On Thu, Mar 23, 2006 at 02:27:07PM +0200, Yuval Kogman wrote:
How else would you implement it that doesn't impact performance?
One of the main reasons for having exceptions is that they're exceptional,
and should be pessimized
modules can be revisited and maybe better
designed.
Please reply to this thread with your tales of glory (or failures,
and the reason they failed).
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: /me climbs a brick wall with his fingers: neeyah
have been happier if I could have a nice hook interface with
which i could trap both module includes, and all IO operations and
insert my own magic into the mess to aid me in my *DEVELOPMENT*
process (not production related at all =)
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
documentation of a language, if you will.
Pugs has example code, some quick start guides, and a few other nice
things in it's repository, which are not pugs specific in any way.
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master
in the compiler's runtime this is
slightly consistent ;-)
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: /me supports the ASCII Ribbon Campaign: neeyah!!!
pgpmGMthxUDLd.pgp
Description: PGP signature
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: /me tips over a cow: neeyah!!
pgpvcXIoJdS3m.pgp
Description: PGP signature
On Wed, Feb 08, 2006 at 12:37:05 -0800, chromatic wrote:
On Tuesday 07 February 2006 23:55, Yuval Kogman wrote:
Does this imply that we should think up this process?
Go ahead.
We'll start at the Israel hackathon, with a little preamble.
The last time someone tried to set forth
trying to
answer these questions.
Thanks
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: /methinks long and hard, and runs away: neeyah!!!
pgpHSuE6cygmL.pgp
Description: PGP signature
have a layered approach we can concentrate on providing
something that is more balanced
... Phew.
Ciao!
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: /me spreads pj3Ar using 0wnage: neeyah!!!
pgpkySSgvyN4A.pgp
Description: PGP signature
6's design, which I think is also important.
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: /me does not drink tibetian laxative tea: neeyah!
pgpQnTRA3i2ZH.pgp
Description: PGP signature
On Wed, Feb 08, 2006 at 08:59:35 +0800, Audrey Tang wrote:
On 2/8/06, Yuval Kogman [EMAIL PROTECTED] wrote:
If Audrey is willing, I think a correct new direction for pugs is to
try and separate the parts even more - the prelude is a mess right
now, many of it's part are duplicated across
macros get (the
definition of the AST). Etc etc etc. These things are also important
to implementation, and amount to a huge chunk of code. If we can
layer this code, chunk it up, componentize it and make it clean we
we can implement it more easily.
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418
runtime, not just
syntax/features.
What I'm suggesting is a start in this clarification - trying to
componentize the existing syntax/feature spec that we do have, so
tha the design of the runtime can be simplified and more
concrete/attainable.
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl
of attribute grammars - i'd like to be
able to automatically derive node roles inside AGs by just
specifying a generic universal behavior, and behavior for the
leaves.
Err, comments please =)
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master
, so
there's not much to say.
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: /me climbs a brick wall with his fingers: neeyah!
pgpjt66A0JBma.pgp
Description: PGP signature
On Sun, Jan 29, 2006 at 20:29:43 +, Herbert Snorrason wrote:
On 29/01/06, Yuval Kogman [EMAIL PROTECTED] wrote:
Basically the plan is that when an internal AST language is decided
upon, the macros will be able to get either the source code text, or
an AST.
Two things. First, if the AST
as a function could simply import $module into the non
lexical scope because it's a runtime thing, unless it's made into a
macro/some other compile time construct, that is more declarative
in nature, and makes the whole process more opaque.
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
for this it
won't be very extensible, but this is important because perl is
reallly hard to parse.
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: /me supports the ASCII Ribbon Campaign: neeyah!!!
pgpnA5re5zZw2.pgp
Description: PGP
stuff.
This is a very good start towards a model where a crippled runtime
is mixed with a fully priviliged one, with grey areas in the middle.
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: : neeyah
general since it allows classification to include
duplicates.
Grep is simply:
sub grep (filter, [EMAIL PROTECTED]) {
classify - $x, f {
f($x) if filter($x);
} [EMAIL PROTECTED];
}
--
() Yuval Kogman [EMAIL PROTECTED
to be around. As
long as it's not too late ;-)
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: : neeyah!
pgpABuzitn7pL.pgp
Description: PGP signature
On Fri, Oct 28, 2005 at 14:19:46 -0400, Stevan Little wrote:
Yuval,
On Oct 28, 2005, at 10:59 AM, Yuval Kogman wrote:
On Thu, Oct 27, 2005 at 22:19:16 -0400, Stevan Little wrote:
Now, at this point we have a method conflict in suspension since
(according to A/S-12) method conflicts do
, and if not it warrants familiarity.
I don't think we can let the user use library code without being
aware of the library code internals at all. Abstraction that works
like this is usually either crippled or useless. 90% of the time you
don't want to know, but there are exceptions.
--
() Yuval Kogman [EMAIL
that... In that case roles are broken... They
will need instance data (that doesn't conflict when it's private) to
support the methods they give their consumers.
Is there any good reason to not allow roles to introduce member data
into a class?
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl
by overzealous typing.
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: /me has realultimatepower.net: neeyah
pgp0aSpBeHuHF.pgp
Description: PGP signature
On Tue, Oct 18, 2005 at 21:04:02 +0200, Juerd wrote:
Yuval Kogman skribis 2005-10-18 20:38 (+0200):
the function encode has the type Unsafe - Safe
I read the article before. What occurred to me then did so again now.
What exactly do Unsafe and Safe mean? Safe for *what*?
That was just
parametrized, but i don't really mind parametrizing roles that are
really classes to make anonymous classes. This way it is clear that
there can never be uninstantiatable classes around.
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: /me kicks %s on the nose: neeyah
we think it will be structured, and
how we think it should be written.
Please post feedback and criticism on the list, #perl6 or the wiki
page.
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: : neeyah
of doing
it, but if perl 6 gets compiled portably to many different
bytecodes (which it seems like it will) someone somewhere will write
a backend which allows people to encrypt, and people will use it.
I think this is something we need to accept, even if it isn't
something we like.
--
() Yuval
a lot in many places.
This has even more implications with closed classes to which you
don't have source level access, and if this can happen it will
happen - i'm pretty sure that some commercial database vendors would
release closed source DBDs, for example.
--
() Yuval Kogman [EMAIL
On Sun, Oct 09, 2005 at 20:22:59 +0200, Ingo Blechschmidt wrote:
Opinions?
Yes!
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: *shu*rik*en*sh*u*rik*en*s*hur*i*ke*n*: neeyah
pgpPtAVtx26AP.pgp
Description: PGP signature
On Fri, Oct 07, 2005 at 02:31:12 -0400, Austin Hastings wrote:
Yuval Kogman wrote:
On Thu, Oct 06, 2005 at 14:27:30 -0600, Luke Palmer wrote:
On 10/6/05, Yuval Kogman [EMAIL PROTECTED] wrote:
when i can't open a file and $! tells me why i couldn't open, i
can
On Fri, Oct 07, 2005 at 05:23:55 +0100, Piers Cawley wrote:
Peter Haworth [EMAIL PROTECTED] writes:
On Wed, 5 Oct 2005 19:24:47 +0200, Yuval Kogman wrote:
On Wed, Oct 05, 2005 at 16:57:51 +0100, Peter Haworth wrote:
On Mon, 26 Sep 2005 20:17:05 +0200, TSa wrote:
Piers Cawley wrote
as a copy to enter this container if it's type doesn't
match.
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: /me sushi-spin-kicks : neeyah
pgpT5DKCUCMHu.pgp
Description: PGP signature
no reason why we would want to
implement this any other way but using continuations.
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: *shu*rik*en*sh*u*rik*en*s*hur*i*ke*n*: neeyah
pgpRP3mAuY8ah.pgp
Description: PGP signature
everywhere for a given version
of Perl.
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: /me does a karate-chop-flip: neeyah!!
pgpdHU54ECTW7.pgp
Description: PGP signature
it's interface by calling code it
doesn't know with a certain parameter, accepting a certain parameter
back.
That way encapsulation is not broken, but errors that happen deep
inside a call chain can be dealt with by code that can interact with
the user.
--
() Yuval Kogman [EMAIL PROTECTED
to fail (or
delegate a fail), until the failure crosses into a 'use fatal'
scope.
That way both the catching code and the throwing code are reusable
and orthogonal when they are unrelated, but the possibility of
coupling handling code with throwing code is still there.
--
() Yuval Kogman
...
}
when MyApp::Timeout {
ask_user_to_continue_or_abort();
}
...
}
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: /me dodges cabbages like macalypse log N: neeyah!
pgpQfW4BcQBM2.pgp
]));
dynamic(notcode, static({ $_+1 }, [1,2,3,4,5]));
This is only with full inferencing, either lexically enabled as a a
pragma (in the scope that invokes), or if enabled globally.
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: /me does a karate-chop-flip: neeyah
On Thu, Oct 06, 2005 at 14:27:30 -0600, Luke Palmer wrote:
On 10/6/05, Yuval Kogman [EMAIL PROTECTED] wrote:
when i can't open a file and $! tells me why i couldn't open, i
can resume with an alternative handle that is supposed to be the
same
when I can't
' as a
taint-oriented-role, that installs an event handler for the tainting
container and any value, marking a runtime specific flag that means
sensitive.
That way the implementation of the role is simple.
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: uhm, no, I think
handler knows *EVERYTHING* because it knows what
exception it caught:
CATCH {
when some_kind_of_error {
$!.continue($appropriate_value_for_some_kind_of_error)
}
}
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
the current environment.
Yes, I see, but instead of doing it that way you can do it more
safely with more characters by introspecting the exception object
and using well documented attributes instead.
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: /me groks
);
} else {
die $!;
}
}
}
Pluginish::App-run;
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: /methinks long and hard, and runs away
one, due to an error, the code
may choose to deal with the error by giving you a big stick. Then
you can go back and beat the minotaur into submission, and resume
with trying to get results.
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: /me whallops greyface
of thought.
I intentionally did not use the computer related definitions from
e.g. wikipedia, because they are more subject to cultural inertia,
and we are trying to discover the roots of these borrowed terms.
--
() Yuval Kogman [EMAIL PROTECTED] 0xEBD27418 perl hacker
/\ kung foo master: /me
.
The reason exceptions tend to pop upwards more is that they are
handled in a way that if the immediate caller doesn't know how to
handle it either, it keeps going up the call stack till a calling
scope does know what to do, and can explcititly take control.
--
() Yuval Kogman [EMAIL PROTECTED
is that records in a static language are static, and
hashes are dynamic.
There is no way to tell the user at compile time that a variable
doesn't exist because we don't know if there's such a hash key.
This means that 'use strict' cannot work in a 'with'ed block.
--
() Yuval Kogman [EMAIL PROTECTED
1 - 100 of 247 matches
Mail list logo