RE: handling undef better

2005-12-17 Thread Gordon Henriksen
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 #

Re: Proposal to make class method non-inheritable

2005-10-12 Thread Gordon Henriksen
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 } }

Re: Proposal to make class method non-inheritable

2005-10-12 Thread Gordon Henriksen
.) { 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]

RE: Proposal to make class method non-inheritable

2005-10-12 Thread Gordon Henriksen
you're subclassing, it's your responsibility to make it work -- Gordon Henriksen [EMAIL PROTECTED]

RE: Ambiguity of parsing numbers with underscores/methods

2005-08-18 Thread Gordon Henriksen
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]

Re: hash subscriptor

2004-04-10 Thread Gordon Henriksen
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]

Re: The Sort Problem: a definitive ruling

2004-02-21 Thread Gordon Henriksen
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]

Re: Semantics of vector operations

2004-01-31 Thread Gordon Henriksen
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]

Re: Semantics of vector operations

2004-01-25 Thread Gordon Henriksen
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

RE: Vocabulary

2003-12-17 Thread Gordon Henriksen
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]

RE: Vocabulary

2003-12-16 Thread Gordon Henriksen
finally by default? None for me; thanks, though. -- Gordon Henriksen IT Manager ICLUBcentral Inc. [EMAIL PROTECTED]

Re: Properties

2003-11-30 Thread Gordon Henriksen
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]

RE: The C Comma

2003-11-25 Thread Gordon Henriksen
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]

RE: The C Comma

2003-11-25 Thread Gordon Henriksen
aid that adding the second would cause Perl source code to trigger spam filters... -- Gordon Henriksen IT Manager ICLUBcentral Inc. [EMAIL PROTECTED]

RE: The C Comma

2003-11-25 Thread Gordon Henriksen
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").

RE: Control flow variables

2003-11-19 Thread Gordon Henriksen
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

RE: Control flow variables

2003-11-19 Thread Gordon Henriksen
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]>

RE: Control flow variables

2003-11-19 Thread Gordon Henriksen
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]

RE: Control flow variables

2003-11-19 Thread Gordon Henriksen
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

RE: Next Apocalypse

2003-09-19 Thread Gordon Henriksen
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]

Speculative optimizations (was RE: Next Apocalypse)

2003-09-17 Thread Gordon Henriksen
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]

RE: Next Apocalypse

2003-09-16 Thread Gordon Henriksen
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]

RE: Next Apocalypse

2003-09-15 Thread Gordon Henriksen
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]

Re: Next Apocalypse

2003-09-14 Thread Gordon Henriksen
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]

Re: PerlHash.get_pmc_keyed of non existing key

2003-08-23 Thread Gordon Henriksen
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]

Re: PerlHash.get_pmc_keyed of non existing key

2003-08-23 Thread Gordon Henriksen
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];

Re: PerlHash.get_pmc_keyed of non existing key

2003-08-23 Thread Gordon Henriksen
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]

Re: Protocols

2003-07-25 Thread Gordon Henriksen
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]