I find it useful to distinguish between unassigned and undefined (null).
"None" is very often a valid value, especially for primitive types, and
especially where databases are involved. i.e., the range of a variable might
be {undef, -2^31..2^31-1}. In my experience:
99 + undef -> 99 #
method supportsFeatureA (Class $c:) { bool::true }
}
role SupportsFeatureB {
method supportsFeatureB (Class $c:) { bool::true }
}
class AB {
does PlugIn;
does SupportsFeatureA;
does SupportsFeatureB;
}
role SupportsFeatureC {
method supportsFeatureC (Class $c:) { bool::true }
}
.) { return this.Class.Bar(...); }
}
I'll leave the probably obvious role-based interpretation of this to
those versed in such. :)
And I'm going to shut my yap, now, having butted into the middle of a
discussion of a hopelessly complex runtime that I haven't been
following for a 18 months. :)
—
Gordon Henriksen
[EMAIL PROTECTED]
you're subclassing, it's your responsibility to make it work
--
Gordon Henriksen
[EMAIL PROTECTED]
since you really mean it
The decimal point without a fractional part looks bizarre to me:
1.e5 # syntax error
Surely +. and -. are invalid syntax? << (\.\d+)? >>, not << (\.\d*)? >>.
--
Gordon Henriksen
[EMAIL PROTECTED]
late to the party, but I just
though perhaps worth pointing out that a very simple solution to the
{call()} vs. {bareword} ambiguity, the {"string literal"}, is indeed
fewer keystrokes and less surprise (at least for a Perl 5 programmer)
and less context dependence than «»-is-a-subscript-now-too.
Ba-a-ah,
Gordon Henriksen
[EMAIL PROTECTED]
same call to
sort... Blech.
But if sort's arguments were specifically typed, i.e.:
my @array of Int;
@array = sort @array;
Does this meet the "key extractor returns number" qualification?
—
Gordon Henriksen
[EMAIL PROTECTED]
ood
style for library authors to provide ASCII alternatives in the form of
multimethods. Then, at least, the alternative name will be pertinent to
the module.
—
Gordon Henriksen
[EMAIL PROTECTED]
On Friday, January 23, 2004, at 10:57 , Larry Wall wrote:
Anyway, if we do use _ for that, the people who want to warp Perl into
Prolog will have to use something else for unnamed bindings. :-)
Use ¬! Then the AppleScripters will feel right at home when they upgrade
to Perl 6. :/
—
Gordon
r inline checks), and limits code motion. Better than the
alternative, I say. It is very simply a huge step backwards to
create a semantic wall between primary compilation and program
execution.
So write the complicated code to make it work right.
- or -
Take the performance hit and go home.
Dynamism has a price. Perl has always paid it in the past. What's
changed?
--
Gordon Henriksen
IT Manager
ICLUBcentral Inc.
[EMAIL PROTECTED]
finally by default? None for me; thanks, though.
--
Gordon Henriksen
IT Manager
ICLUBcentral Inc.
[EMAIL PROTECTED]
ethod definitions in separate files; i.e. purely a
structural convenience to the compiler's user, with absolutely no effect
at runtime.
http://www.c-sharppro.com/features/2003/10/cs200310bw_f/cs200310bw_f.asp
search for "Partial types are simple"
—
Gordon Henriksen
[EMAIL PROTECTED]
bar}
do is not merely prototyped, but a builtin. With a mandatory {} arg, why
wouldn't it be greedy?
On the other hand, ()-less conditionals are giving me heebie-jeebies
very distinctly reminiscent of Perl 5's indirect object method
invocation syntax.
--
Gordon Henriksen
IT Manager
ICLUBcentral Inc.
[EMAIL PROTECTED]
aid that adding the second would cause Perl source code
to trigger spam filters...
--
Gordon Henriksen
IT Manager
ICLUBcentral Inc.
[EMAIL PROTECTED]
conjugation.
The suspect drank half a dozen double whiskeys;
then he drove into a lake.
The suspect drank half a dozen double whiskeys
and then drove into a lake.
--
Gordon Henriksen
IT Manager
ICLUBcentral Inc.
[EMAIL PROTECTED]
* - It's also a sometimes a noun ("live has been hard since then") and
rarely an adjective ("the then president").
Larry Wall wrote:
> On Tue, Nov 18, 2003 at 06:28:59PM -0500, Gordon Henriksen wrote:
>
> > my @b = for @a -> $_ {
> > ...
> > }
>
> That will be a syntax error. Generators are too mind-stretching to
> inflict on novices [...]
I making the p
rtburn?
YADA: {
my $is_ok = 1;
for 0..6 -> $t {
if abs(@new[$t] - @new[$t+1]) > 3 {
break YADA;
}
}
yada();
}
Loop controls are just goto in disguise, anyhow.
--
Gordon Henriksen
IT Manager
ICLUBcentral Inc.
[EMAIL PROTECTED]>
oo would the vectorized
version. But that's a completely orthogonal feature; unrelated and not
in conflict.
--
Gordon Henriksen
IT Manager
ICLUBcentral Inc.
[EMAIL PROTECTED]
No, because the
if $a
from "return if $a;" doesn't match the production
if [else ]
I so don't want to be anywhere near the Perl6 parser...
--
Gordon Henriksen
IT Manager
ICLUBcentral Inc.
[EMAIL PROTECTED]
> -Original Message-
> From: Mich
t sets up a namespace for optimizations, which might help make
optimizations extensible, transparent, or even pluggable.
--
Gordon Henriksen
IT Manager
ICLUBcentral Inc.
[EMAIL PROTECTED]
ood enough for perl 5 in limited circumstances. On the other hand,
method calls are much more common than inlining constant subroutines: It
might not be good enough for parrot, depending upon the speculative
optimizations in question.
--
Gordon Henriksen
IT Manager
ICLUBcentral Inc.
[EMAIL PROTECTED]
gister & variable remapping and PC mutation--and it is
impossible to solve after code motion optimizations, for the same reason
that C++ debuggers get horribly confused when running over -O3 code.
--
Gordon Henriksen
IT Manager
ICLUBcentral Inc.
[EMAIL PROTECTED]
from the file
specified in $ARGV[0], then that assumption is violated. Now, the
optimization has to be backed out, or the program will never call the
subclass's say_hi. Letting the GC clean up the old version of main when
the notification is received isn't enough--the existing stack frame must
actually be rewritten to use the newly-compiled version.
--
Gordon Henriksen
IT Manager
ICLUBcentral Inc.
[EMAIL PROTECTED]
the best of both dynamism and performance whenever
possible, not just when the programmer felt like hamstringing himself in
advance by declaring a class or method to be final.
—
Gordon Henriksen
[EMAIL PROTECTED]
On Saturday, August 23, 2003, at 11:14 , Sean O'Rourke wrote:
Luke Palmer <[EMAIL PROTECTED]> writes:
Gordon Henriksen writes:
my $ref = [EMAIL PROTECTED];
$$ref = "value";
print '@ary[0] : ', @ary[0], "\n"; # -> @ary[0]
On Saturday, August 23, 2003, at 10:37 , Luke Palmer wrote:
Gordon Henriksen writes:
Taking a thread from Perl 6 Internals. Will Perl 6 support this
behavior?
$ perl <<'EOT'
my @ary;
my $ref = \$ary[0];
my $ref = [EMAIL PROTECTED];
@cats[0] := $$ref;
@cats[1] := @cows[0]; # Just to hammer the point home
$$ref = new Dog;
But then there's a question for p6i as to how all the above happens.
—
Gordon Henriksen
[EMAIL PROTECTED]
or: An element
of object-oriented design can arise after the implementation of a class.
That has a very Perl 6-ish feel to it, closer to the untyped flexibility
of Perl 5 than the de rigueur rigidity of Java.
—
Gordon Henriksen
[EMAIL PROTECTED]
28 matches
Mail list logo