What would be the criteria for deciding whether to name P6 constants
using lower-case or UPPER_CASE names?
Generally, system constants and variables use upper-case, so
lower-case keeps user variables in a separate name space. Do
user-defined constants belong there, or in upper-case to indicate
On Sat, Dec 20, 2008 at 11:45:38PM -0500, Brandon S. Allbery KF8NH wrote:
On 2008 Dec 20, at 13:39, Carl Mäsak wrote:
Maybe this counts as a best practice, or maybe it's more of a
pattern. In a recent piece of code, I found a way to exploit code
blocks to act like return statements with side
Maybe this counts as a best practice, or maybe it's more of a
pattern. In a recent piece of code, I found a way to exploit code
blocks to act like return statements with side effects. The
resulting code became very clean, so I decided to blog about the way
it works.
On 2008 Dec 20, at 13:39, Carl Mäsak wrote:
Maybe this counts as a best practice, or maybe it's more of a
pattern. In a recent piece of code, I found a way to exploit code
blocks to act like return statements with side effects. The
resulting code became very clean, so I decided to blog about the
HaloO,
Martin D Kealey wrote:
Surely it is more important that ($a ne $b) should be equivalent to not( $a
eq $b ) regardless of whether either variable contains a junction?
IIRC, ne is just an abbreviation of !eq where ! in turn as a meta
operator means to pull the negation to the front. Are
HaloO,
one nifty thing could be negation propagation in chained
comparisons: ($a ne $b ne $c) === !($a eq $b || $b eq $c).
This again insures some sanity if any of $a, $b or $c are
junctions. BTW, the boolean connectives , || and ^^ shouldn't
be auto-threaded through junctions.
Regards, TSa.
On Tue, Sep 30, 2008 at 02:31:46PM +1000, Jacinta Richardson wrote:
Carl Mäsak wrote:
The correct form using junctions would be this:
die Unrecognized directive: TMPL_$directive
if $directive ne 'VAR' 'LOOP' 'IF';
which makes sense, because this does give us:
$directive
On Tue, 30 Sep 2008, Patrick R. Michaud wrote:
Just for pedantic clarity, what C $directive ne 'VAR' 'LOOP' 'IF'
really gives is
all( $directive ne 'VAR', $directive ne 'LOOP', $directive ne 'IF' )
In other words, the result of the expression is an all() Junction. In
boolean context
Carl Mäsak wrote:
Do not combine 'ne' and '|', like this:
die Unrecognized directive: TMPL_$directive
if $directive ne 'VAR' | 'LOOP' | 'IF';
One is tempted to assume that this means the same as $directive ne
'VAR' || $directive ne 'LOOP' || $directive ne 'IF, but it doesn't.
Instead,
Conrad ():
Is there something more up-to-date concerning Perl 6 best practices that
are presently-recommended (by p6l or @Larry) than the following item on the
Perl 6 wiki?
If you ask me, best practices evolve as a countering force to enough
people using less-than-ideal practices to create
On Sun, Sep 14, 2008 at 04:18:44PM +0200, Carl Mäsak wrote:
Conrad ():
Is there something more up-to-date concerning Perl 6 best practices that
are presently-recommended (by p6l or @Larry) than the following item on the
Perl 6 wiki?
[...]
That said, I do have one Perl 6-specific best
# from Carl Mäsak
# on Sunday 14 September 2008 07:18:
die Unrecognized directive: TMPL_$directive
if $directive ne 'VAR' | 'LOOP' | 'IF';
One is tempted to assume that this means the same as
$directive ne 'VAR' || $directive ne 'LOOP' || $directive ne 'IF',
but it doesn't.
Actually, it
Is there something more up-to-date concerning Perl 6 best practices that
are presently-recommended (by p6l or @Larry) than the following item on the
Perl 6 wiki?
http://www.perlfoundation.org/perl6/index.cgi?perl_6_books_and_media
Perl 5 Books with Perl 6 Relevance
* Perl
13 matches
Mail list logo