Re: What's up with %MY?

2001-09-13 Thread David L. Nicol
Uri Guttman can see a day where: > python and ruby, etc. are > defaulting to using the parrot back end as it will be faster, and > compatible with perl etc. imagine the work reduction if all/most of the > interpreted languages can share one common back end. What about the compiled ones? Did we c

Re: what lexicals do?

2001-09-06 Thread David L. Nicol
Dave Mitchell wrote: > > Here's a list of what any Perl 6 implementation of lexicals must be able to > cope with (barring additions from future apocalyses). Can anyone think of > anything else? I would like perl -le 'my $Q = 3; {local $Q = 4; print $Q}' to print 4 instead of crashing in confu

Re: What's up with %MY?

2001-09-06 Thread David L. Nicol
Damian Conway wrote: > proper lexically-scoped modules. sub foo { print "outer foo\n"}; { local *foo = sub {print "inner foo\n"}; foo(); }; foo(); did what I wanted it to. Should I extend Pollute:: to make this possible: in fi

Re: CLOS multiple dispatch

2001-09-06 Thread David L. Nicol
Hong Zhang wrote: > How do you define the currently loaded? If things are lazy loaded, > the stuff you expect has been loaded may not have been loaded. We could load placeholders that go and load the bigger methods as needed, for instance. -- David

Re: CLOS multiple dispatch

2001-09-04 Thread David L. Nicol
Me wrote: > I found just one relevant occurence of 'mop' in perl6-all archives: > > http://www.mail-archive.com/perl6-all@perl.org/msg10432.html > > And not a single reply... > > I'd really like to see what Dan / lisp folks have to say about mops > and perl6... How about some nice introductor

Re: CLOS multiple dispatch

2001-09-04 Thread David L. Nicol
Dan Sugalski wrote: > It'll probably be something like "Here's the function name. Here's the > parameters. Do The Right Thing." I don't think there's much need for > cleverness on the part of the interface. The actual dispatch code could be > nasty, but that's someone else's problem. :) > >

Re: CLOS multiple dispatch

2001-08-30 Thread David L. Nicol
Hong Zhang wrote: > 3) The multi dispatch is generally slow and complicated. Since it does > not fit well with OO concept, it will just cause more confusion. Typically > we use different solution for OO language vs procedure language. In other words, how much do we want our language to set up f

Re: CLOS multiple dispatch

2001-08-30 Thread David L. Nicol
Me wrote: > I can imagine plausibly useful dispatch rulesets that do not involve > comparing sums of inheritance distances. (Though this *is* all > imagining as I haven't used multimethods/clos in about 10 years.) > > I would also imagine that others see that summing inheritance > distances may

CLOS multiple dispatch

2001-08-29 Thread David L. Nicol
http://www.jwz.org/doc/java.html includes the following gripe about Java: > I sure miss multi-dispatch. (The CLOS notion of doing > method lookup based on the types of all of the arguments, > rather than just on the type of the implicit zero'th > argument, this). CLOS is of course the Commo

Come and get me, Schwern

2001-08-29 Thread David L. Nicol
Michael G Schwern wrote: > The idea that a class is either 'perfect' or 'complete' has to be the > silliest, most arrogant thing I've ever heard! So, subsequent refinements have to use a "has-a" instead of an "is-a" relation in re: objects of the "final" class. Maybe the inclusion of this fe

Re: Expunge implicit @_ passing

2001-08-29 Thread David L. Nicol
Michael G Schwern wrote: > If you *really* wanted to write an optimized redirector, you'd > have the redirector eliminate itself. > > sub foo { > my $method = $_[0]->{"_foo"} || $_[0]->can("_foo"); > { > no warnings 'redefine'; > *foo = $method; > } > goto &$meth

notes from a stroustrup talk

2001-08-29 Thread David L. Nicol
This arrived as part of a mailing list that I suppose I opted into at some point: == More ++, Less C Standard template libraries, abstract classes and multiparadigm programming are keys to high-performance == "Too much C++ code is just C.

Re: Will subroutine signatures apply to methods in Perl6

2001-08-21 Thread David L. Nicol
Garrett Goebel wrote: > > Any word from on high whether subroutine signatures will apply to methods in > Perl6? There's RFC128 and RFC97... but they both mostly dodge the issue of > methods. > > The absense of method signatures for specifying required, optional, and > named parameters... not to

Re: Per-object inheritance in core a red herring?

2001-07-11 Thread David L. Nicol
Dan Sugalski wrote: > > At 11:01 AM 7/10/2001 -0400, Adam Turoff wrote: > >And where's the guarantee that vtbls are per-object and not per-class? > > VTABLES ARE PER OBJECT. > > So mote it be. :) > > Dan What? Up until now it's been vtable-pointers are

Re: Per-object inheritance in core a red herring?

2001-07-10 Thread David L. Nicol
Adam Turoff wrote: > > On Tue, Jul 10, 2001 at 02:08:58AM -0500, David L. Nicol wrote: > > Uh, C++ virtual methods can be overloaded on a per-object basis, not > > just a per-class basis, since the object drags around its virtual jump > > table with it wherever it g

Re: Per-object inheritance in core a red herring?

2001-07-10 Thread David L. Nicol
Adam Turoff wrote: > And what's the linguistic hook that allows C++ object-based inheritance? > And where's the guarantee that vtbls are per-object and not per-class? > > Z. You're right, it might be a side effect of a particular implementation of virtual methods. But AIUI that implementation

Re: Per-object inheritance in core a red herring?

2001-07-10 Thread David L. Nicol
[EMAIL PROTECTED] wrote: > Anyhow, if you want Perl 6 objects to be able to act as if they're in > their own class (ie. have their own methods, inheritance, etc...) how > are you going to do this without having the moral equivalent of a > stash associated with it? And if you can do something that

Re: Per-object inheritance in core a red herring?

2001-07-09 Thread David L. Nicol
[EMAIL PROTECTED] wrote: > > On Fri, Jun 29, 2001 at 09:50:55AM -0400, Dan Sugalski wrote: > > Besides, there are languages that do this on a per-object basis all the > > time anyway (aren't there? I think there are) in which case it makes sense > > to yank it into the core interpreter, as it'll

Feeding potatoes to dead horses

2001-07-09 Thread David L. Nicol
Michael G Schwern wrote: > I'm going to say you need sigils for this: > > print "Hello, my name is $name\n"; > > You're going to say this: > > print "Hello, my name is $(name)\n"; I actually prefer print "Hello, my name is ",name,"\n"; or, the sigil is simply optio

Re: Between-Opcode Callbacks

2001-07-09 Thread David L. Nicol
Jarkko Hietaniemi wrote: ... > This sounds like having also 'basic block' entry/exit opcodes. Hmmm. > > BLB = block begin > BBB = basic block begin > SE = statement end > BBE = basic block end > BLE = block end > > sub foo { > BLB > BBB > my ($a, $b) = @_; > S

Re: "Implied types, first try." Or "Its amazing what you can do with potatoes"

2001-07-09 Thread David L. Nicol
[EMAIL PROTECTED] wrote: First off, I'm going to pound on one of my deceased horses a bit: Why not drop the sigil on things with declared types? Then $foo keeps its status as Perl's Magic Autoconverting Wondertype and without it, we know we aren't dealing with the PMAW and we won't make mistake

Re: "You can't make a hot fudge sundae with mashed potatoes instead of ice cream, either."

2001-07-09 Thread David L. Nicol
Jeremy Howard wrote: \ > Perl 5 didn't need templates, because there wasn't compile-time typing. But > with Perl 6 I want to send my compact array of integers to the same fast > sum() function as my compact array of floats, and not have to wait while > perl treats them both as old generic scalars.

Re: http://www.ora.com/news/vhll_1299.html

2001-07-09 Thread David L. Nicol
Buddha Buck wrote: > True, agreed, and admitted. So why can't a general purpose programming > language be designed with XML-based syntax? Why can't a general-purpose > programming language be augmented with XML for internal documentation purposes? Maybe the gcc back end could accept this new X

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-09 Thread David L. Nicol
Matt Youell wrote: > > >What if you want multiple constructors with redundant code, et cetera -- > >there is flexibility. > > You could get that same flexibility from a mandated new(). If you don't want > to support new, overload it so that it does nothing. Or maybe that could be > the default b

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-06 Thread David L. Nicol
Matt Youell wrote: > > Is there a standard? No. Does there need to be one? I don't see a need > > for it. > > What's wrong with something simple, like saying all classes have an implicit > new() method that is overloadable? Is this really *that* complicated? Maybe > I'm not getting the Big Pic

Re: Anyone actually experienced with object inheritance?

2001-07-05 Thread David L. Nicol
Hong Zhang wrote: > > Say if you want Thread can be easily inserted into LinkedList, > you can write > > public Thread extends Object implements Node { > ... > } > > or > > public Thread extends Object, Node { > ... > } > > and don't bother to implement classic linked list node. > > Hong

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-05 Thread David L. Nicol
Matt Youell wrote: > > > > MI thing, but now it's sounding like a constructor bubbling scheme, like > > > Ah, yes. I've had to deal with that problem several times in the past. The > terminology was new to me, however. > > Has there been a proposed solution? > > Thanks, > > - Matt What's th

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-03 Thread David L. Nicol
Matt Youell wrote: > > Forgive my woeful ignorance Could someone define "data aggregation by > inheritance"? From John's original mention I thought this was some oblique > MI thing, but now it's sounding like a constructor bubbling scheme, like in > C++, etc. I understood it to mean automati

Re: Anonymous classes (was Re: Anyone actually experienced with object inheritance?)

2001-07-03 Thread David L. Nicol
John Porter wrote: > > Michael G Schwern wrote: > > > Give me data aggregation by inheritance > > Oooh, now that would be useful. > > Of course it would. That's why nearly every OO language (beside Perl) > has it. package circular_list_node; ... # defines how the list_nodes do

Re: Multiple classifications of an object

2001-06-28 Thread David L. Nicol
Garrett Goebel wrote: > > So every class has a vtable, which is a copy of its parents except for > > what is overridden within it, and a instance that wishes to > > deviate could make a local copy of its vtable and twiddle it. > Why not just fall back to the ancestor(s) unless it provides its o

Re: Multiple classifications of an object (the ::: placeholder)

2001-06-27 Thread David L. Nicol
Dan Sugalski wrote: > > Basically my preference, if we're going with a per-object .ISA with no > class ISA fallback, is for each object to be independent and not affect any > other object when its properties are messed with. I'm straining to understand the subtle distinction btwn per-object ISA

Re: Multiple classifications of an object

2001-06-27 Thread David L. Nicol
"Mark J. Reed" wrote: > But you're opening a big can of worms if you make such a > change. The biggest impact would be in the way methods are defined. > Instead of just being members of a package, they would have to be > associated with particular objects (classes or instances). A method > may

Re: Multiple classifications of an object

2001-06-27 Thread David L. Nicol
John Porter wrote: > without any kind of data aggregation, as in most other OO > languages, what else is there to inheritance but late binding > of methods? Early checking of method name validity? -- David Nicol 816.235.1187 ftp:

'We already have a "sub" keyword'

2001-06-27 Thread David L. Nicol
David Whipp wrote: > > Mark J. Reed wrote: > > Okay, but now we're getting into the fundamental O-O model for > > Perl. I guess that's fair game? You can certainly make the case > > that prototype-based inheritance makes at least as much sense > > as class-based inheritance for a dynamic langua

Re: Multiple classifications of an object

2001-06-27 Thread David L. Nicol
David Whipp wrote: > The other standard solution is to > add a "Person has-a Employment_Status" relationship, > but that doesn't feel much better. It feels fine to me. Person has-a gender, person has-a job, it's more politically correct, even, than pigeonholing. You can even do dynamic multipl

making variables or containers read-only

2001-06-21 Thread David L. Nicol
"Mark J. Reed" wrote: > If I wanted to make a variable read-only, I would expect to do it > by setting the read-only attribute on that variable, which I would > further expect to do the same way I would set any other attribute at > any other time. Orthogonality has its good points, even in Perl;

Re: Embrace polymorphic builtins, for they are cool.

2001-06-20 Thread David L. Nicol
> > Now look at eval. When acting on a string, it compiles and runs it as > code. When acting on a block, it traps any errors and prevents dying. > You may be able to come up with some weak analogies between the two, > but they're two different functionalities. i have nothing to add. you o

more slots in the glob, 'but', Re: 'is' and action at a distance

2001-06-18 Thread David L. Nicol
I had imagined the way things like $R = 0 but true would work is that the scalar would grow another couple of slots in it, which would be the conversion operators. Everything defaults to how it has worked in the past, but could be overridden. So the boolean value starts as "default c

Re: tasty db data

2001-06-13 Thread David L. Nicol
Dan Sugalski wrote: > > At 04:39 PM 6/12/2001 -0500, David L. Nicol wrote: > > > >I appear to be suggesting that deferability be an add-on that causes some > >rewriting to support itself, rather than an optimization to parse away > >bothering with silly calculati

tasty db data

2001-06-12 Thread David L. Nicol
Since I just proposed a new paradigm I'll try to apply it, before darting down the hill and getting my sandwich. Dan Sugalski wrote: > > David L. Nicol [made an akward metaphor with data as summer campers] > That's less easy than you might think. Quick: > >$

deferred FETCH called "tasty"

2001-06-12 Thread David L. Nicol
I think I'm repeating what has been said already but here goes. After sending this I'm breaking for a sandwich. :) for database data, the problem domain is limited sensibly. We want to defer as many lookups as possible, so they can be sent as a bunch rather than sent one by one, and we would l

Re: Coupla Questions

2001-06-12 Thread David L. Nicol
Damian Conway wrote: > > Graham wrote: > >> Now I may be wrong here, but I thought I remembered something about >> >> .foo being the same as $_.foo > > It's certainly a possibility. > >> In which case you could do >> >>for (%database.$accountnumber) { >> >

Re: Multi-dimensional arrays and relational db data

2001-06-12 Thread David L. Nicol
Dan Sugalski wrote: > I'm still trying to formulate a good set of rules on how I think active > data should perform under optimization to pass on to Larry. > > Dan How about, Active data doesn't get optimized. Static data doesn't care if you access ir or

Re: Coupla Questions

2001-06-11 Thread David L. Nicol
Damian Conway wrote: > > Graham asked: > >> IIRC there was some suggestion of a class being able to declare >> elements to be accessable as methods in this was. >> >> So if $ref is of a known type and 'a' was declared in that way, >> the parser would take $ref.a and turn it i

Re: Multi-dimensional arrays and relational db data

2001-06-11 Thread David L. Nicol
[EMAIL PROTECTED] wrote: > You may wish to read this thread about lazy arrays and object > persistence to get an idea of what you're getting into. > http://www.geocrawler.com/archives/3/3024/2001/3/0/5427925/ Taking lazy as far as we can, has anyone been thinking about a compilation mode in whic

Re: Multi-dimensional arrays and relational db data

2001-06-11 Thread David L. Nicol
Vijay Singh wrote: > >"Just how much $foo can dance on the head of a dot operator" The current Annals Of Improbable Research (http://www.improb.com) has a piece on applying modern physics to the age-old question, you know, about the boogieing angels. --

Embrace polymorphic builtins, for they are cool.

2001-06-11 Thread David L. Nicol
Coming to Perl 5 from a C++ background, I was greatly disappointed, while writing a persistent object base class and consulting my new, flat-lying Blue Camel (Second edition, this was 1996), that the following kind of thing did not do what I wanted: sub argle($){ print

it is perl5 but...

2001-06-08 Thread David L. Nicol
~/perl/perl-5.7.1$ ./perl -le '%a=(1..10); print it; exists $a{1} and print it' 2 -- David Nicol 816.235.1187 The toad doesn't know it has ten toes.

Re: Properties and stricture and capabilities

2001-06-07 Thread David L. Nicol
Michael G Schwern wrote: > Symbol table manipulation will work as long as your mucking about > doesn't alter the strict class's signature. ie. you can shove a code > ref onto the symbol table as long as a stub for that method was > defined at compile time. a read-only hash of any kind makes it

Re: 1 until defined(getvalue()); return $^d;

2001-06-07 Thread David L. Nicol
John Porter wrote: > > David L. Nicol wrote: > > I really don't know enough about perl 5 internals to go on; I > > am certain that this feature is a no-brainer though > > Besides the fact which, how it might be added to perl5 > does not say much about how it

Re: 1 until defined(getvalue()); return $^d;

2001-06-07 Thread David L. Nicol
John Porter wrote: > Huh? What did I say?:: you said there would be no performance hit in rewriting defined|exists to store the pointer to the thing that was found to be defined or exist somewhere. After looking at the source code for what might have been the wrong part of /usr/src/perl/perl-

Re: $foo.Foun (was Re: Properties and stricture)

2001-06-06 Thread David L. Nicol
Me wrote: > > Question 1: > > Afaict, even with use strict at its most strict, perl 6 > can't (in practice) complain, at compile time, if > > $foo.Foun > > refers to an undeclared Foun. > > Right? it is already detectable. from perldoc perlref: Perl will raise an except

"closed" property ((was Re: $foo.Foun ((was Re: Properties and stricture

2001-06-06 Thread David L. Nicol
Me wrote: > I.Found your notion of a "sealed off namespace" > intriguing. I have no idea what it meant just yet; > I'm going to go read and think about it now. I'll pitch some syntax: # prevent modification to %reflexive:: like so: package reflexive is closed; # allow i

Re: Properties and stricture

2001-06-06 Thread David L. Nicol
Me wrote: > > > [strict typing] > > > > Not a negative, but realize that many people find it > > of less value than the annoyances it brings with it > > (myself included) > > Michael, I don't know which is more impressive; the > fact that use of a strictly typed language implies that > a copy of

Re: Coupla Questions

2001-06-06 Thread David L. Nicol
Damian Conway wrote: > $ref.{a}can be $ref{a} which can also be $ref.a can it not?

Re: 1 until defined(getvalue()); return $^d;

2001-06-06 Thread David L. Nicol
Simon Cozens wrote: > Please don't try defending "it" or "$^d" in terms of efficiency; > any variable that Perl has to keep track of magically takes a > performance hit. Remember $`, $', and $&? No, this datum is already known by defined() and exists() all I am suggesting is a name for the Perl

Re: 1 until defined(getvalue()); return $^d;

2001-06-06 Thread David L. Nicol
Since this thread made it into this week's Official Perl6 Summary, here goes a defense of C as a shorthand for the thing that last had C or C queried of it. It (by which I mean C, isn't this fun) would be a side-effect of non-autovivifying queries. It allows redundant descents into arbitrarily

Re: Stacks, registers, and bytecode. (Oh, my!)

2001-06-04 Thread David L. Nicol
Hong Zhang wrote: > > based scheme itself. For example, an local variable is not used by > any of the code, however an eval($s) may refer to it. So should optimizer > eliminate the local? > > Hong mark blocks that have closures in them, in those, you can't throw any locals out. Otherwise, you

my $howmany=wantarray; while($howmany--){push @R,onemore};

2001-06-01 Thread David L. Nicol
having wantarray return the number of items needed, or -1 for all of them, would work very nicely for user-written partial returners. Did anyone RFC that? -- David Nicol 816.235.1187 [EMAIL PROTECTED] DWIM before autovivify unless strict

Re: 1 until defined(getvalue()); return it;

2001-05-30 Thread David L. Nicol
Simon Cozens wrote: > > On Wed, May 30, 2001 at 06:48:53PM +0100, Simon Cozens wrote: > > *Nice*, but potentially a bugger to implement. > > Of course, 'sub it():lvalue{$_}' gets you *most* of the benefit. um, no. foreach(@foods){ # okay, I'll try... ex

Re: 1 until defined(getvalue()); return it;

2001-05-30 Thread David L. Nicol
Buddha Buck wrote: > Why is [...] better than > > 1 until defined($foo=getvalue()); return $foo; small incremental improvement to [read|writ]ability writability: one less thing to write one less variable name to have to remember not to collide with readability: keyword "it" means look at v

Re: 1 until defined(getvalue()); return it;

2001-05-30 Thread David L. Nicol
Michael G Schwern wrote: > That aside, could you put together a code example of what this wins? some expressiveness is gained, and a creation of a temporary variable can be avoided. ... defined $thing and return $thing ... is my working idiom for checking which case

1 until defined(getvalue()); return it;

2001-05-30 Thread David L. Nicol
while pseudocoding something I realized that it would be really cool if there was another magical default shelf, like $_ or _ but subtly different, that stores, if lexically used, the object of the most recent "defined" or "exists" -- or maybe even the most recently referred to scalar, just

Re: what I meant about hungarian notation

2001-05-30 Thread David L. Nicol
Me wrote: > > It was an informal finger-in-the-wind thing I sent to > a perl beginners list. Nothing special, just a quick > survey. > > http://www.self-reference.com/cgi-bin/perl6plurals.pl > > > I certainly do not see that many people on the > > list agreeing with you. > > And that means I s

Re: p6 casting as shortcut for lengthier p5 syntax

2001-05-11 Thread David L. Nicol
Larry Wall wrote: > > Why should it be deprecated? > > Oh, are you wondering because I said ... What about array and hash accesses starting with scalar-indicators? I guess it is easy to misread A2 to mean that not only will scalar(@trucks[5]) return the sixth truck, but $truc

p6 casting as shortcut for lengthier p5 syntax

2001-05-10 Thread David L. Nicol
I've just put this into a program: warn "about to unlink @{[<$FRname*>]}"; unlink <$FRname*>; (wow, the MUA is a lot less vivid than a colorful code editor -- does mutt or emacs color-code code in e-mails?) Demonstrating, the p5 "cast" can be performed. I guess p6 will optim

Re: Apoc2 - concerns

2001-05-10 Thread David L. Nicol
how to pull the next four lines out of a file handle in way new syntax, Larry Wall wrote: > > Dave Storrs writes: > : < QUOTE LARRY > > : Dave Storrs writes: > : @foo = $STDIN * 4; > : > : Larry What's wrong with old-fashioned autoextending array slices that now DWIM splice @foo,

Re: Safe signals, multiple signals?

2001-05-10 Thread David L. Nicol
Uri Guttman wrote: > > multiple timers This means something like there is this array of sets of events, and a thread that shifts off the front one every second and feeds everythin in it into the event queue. Right? -- David Nicol 816.235.1187 [EMAIL PROTECTED]

Re: what I meant about hungarian notation

2001-05-10 Thread David L. Nicol
John Porter wrote: > > Larry Wall wrote: > > > > : do you think conflating @ and % would be a perl6 design win? > > > > Nope, I still think most ordinary people want different operators for > > strings than for numbers. > > Different operators, conflated data type. > > That's what we have for s

Re: what I meant about hungarian notation

2001-05-09 Thread David L. Nicol
Bart Lateur wrote: > > So what you're saying is that references aren't really scalars, > but their own type. Thus they need their own prefix. > > But we've sort of run out of possible prefixes. that is my interpretation of the p4->p5 decision to make references fit within the scalar type; which

Re: what I meant about hungarian notation

2001-05-09 Thread David L. Nicol
David Grove wrote: ... > This is frightening me too. I really don't like the thought of > > $i = "1.0"; > $i += 0.1 if $INC; > $i .= " Foo, Inc."; > > (or more specifically a one line version that converts several times for a > single statement) > > becoming > > my str $i = "1.0"; > if($INC)

Re: what I meant about hungarian notation

2001-05-08 Thread David L. Nicol
> push chairs, map {woodworking} treestumps; > or even push chairs, map BLOCK(woodworking) treestumps;

what I meant about hungarian notation

2001-05-08 Thread David L. Nicol
Hungarian notation is any of a variety of standards for organizing a computer program by selecting a schema for naming your variables so that their type is readily available to someone familiar with the notation. Just as Python is a language that enforces the common practice of sane indentatio

Re: Apoc2 - concerns

2001-05-08 Thread David L. Nicol
Larry Wall wrote: > > all arrays are iterators of some sort BZZT! HSSS! CLANG! DANGER, WILL ROBINSON! DANGER, WILL ROBINSON

Re: Apoc2 - concerns

2001-05-08 Thread David L. Nicol
Nathan Wiger wrote: > Perhaps qi() for "interpolate" or something else. coming to Perl from Scheme I recall some distress that I had to create ($j=$i) =~ s/(\$\S+)/$1/ge; instead of what I wanted to do $j=qqq/$i/; so my nomination is for tokens matching /qq*/ to behave like s

Re: Apo2: \Q ambiguity is too a problem

2001-05-08 Thread David L. Nicol
Larry Wall wrote: > > The ~~ is a cute hack though. Credit is due to Steve Lane <[EMAIL PROTECTED]> who posted it to funwithperl. ... > I'm sorry, my eyes go crossed when I look at that, and the two \Q's > merge into one, which confuses me, in a stereoscopic sort of way. I was wrong about \Q\

Re: Apoc2 - concerns

2001-05-08 Thread David L. Nicol
Nathan Wiger wrote: > > Truthfully, I've always liked the <>'s (and personally don't think we need a > qw alternative), so I'd rather we stay with: > >$a = <$b>; # same as next $b or $b.next we could generalize the other direction and have angles be a standard shortcut for the "next" met

Re: Apoc2 - concerns

2001-05-08 Thread David L. Nicol
I know it is an annoying and bad habit but I'm still young enough so at first glance I think I know it all. > [billions and billions of] > SYN_A # Return one element regardless of context. > SYN_B # Return number of element wanted by context. > SYN_C # Re

Re: Subroutine attributes, from a long time ago

2001-05-08 Thread David L. Nicol
John Porter wrote: > > > [EMAIL PROTECTED] writes: > > : > > : why should a reader expect that a declarative description > > : of &foo would be followed by the body of &foo? > > Isn't the functional definition of a sub > just another one of its attributes, anyway? I'm a little bit disappointed

Re: Apo2: \Q ambiguity

2001-05-08 Thread David L. Nicol
Johan Vromans wrote: > > [Quoting Michael G Schwern, on May 6 2001, 22:58, in "Re: Apo2: \Q ambigui"] > > Hmmm, maybe you can point out the "compose" key on my keyboard, I > > can't find it. ;) > > Pick whatever you find convenient. I use the right control key. > From my .Xmodmap: > > ! Compo

Re: Apoc2 - Context and variables

2001-05-08 Thread David L. Nicol
Jonathan Scott Duff wrote: > (*%a, %b) = (%c,%d);# %a slurps, %b gets nothing > (%a, *%b) = (%c,%d);# %a = %c, %b gets the rest > > I'm sure your imaginations can twiddle the cardinality knob > appropriate for generalization :-) > > -Scott so if you don't know exactly

Re: Apoc2 - concerns

2001-05-08 Thread David L. Nicol
Nathan Wiger wrote: > > I think Uri's qh() suggestion is the cleanest: me too > And it would make hash declarations cleaner: > >%hash = qh( > foo > bar > jim => 'bob' > var >); > > Plus maybe even a pragma to set the default value: > > use def

Re: Apoc2 - concerns

2001-05-08 Thread David L. Nicol
John Porter wrote: > > Pardon me if someone has already suggested this, but... > Couldn't labels really be (aliases to) iterator objects? > So that > next FOO > really *does* mean > FOO.next > Marvelous! That also wraps up the "for should have an explicit iterator access method

Re: Apoc2 - concerns

2001-05-08 Thread David L. Nicol
Larry Wall wrote: > Syntactically speaking it's too ambiguous to have both a unary < and a > bracketing <>. Cool. Do we get a > operator to use as an l-value, instead of print? >$log = join localtime, 'difficult cramigudgeo'; > It's possible we're thinking of iterators wrong here. P

Re: Apoc2 - concerns ::::: new mascot?

2001-05-08 Thread David L. Nicol
Larry Wall wrote: > there seems to be a shortage of three-humped camels. At last! the unencumbered image for the mascot! Could O'Reilly really claim a three-humped camel was an image of a camel, with a straight face?

Re: Apoc2 - concerns

2001-05-08 Thread David L. Nicol
Simon Cozens wrote: > > On Tue, May 08, 2001 at 01:59:47PM -0400, John Porter wrote: > > Perl is a highly dynamic language > > An object with exactly one and only one method doesn't sound that > dynamic to me. nonsense! It's got accessor methods too, for everyone who wanted to magicalize "$i

Re: Apoc2 - Context and variables

2001-05-08 Thread David L. Nicol
I like the lisp-associative-array alternating keys,values nature of the perl5 %hash=@array semantics, and the way it can be used to set defaults in hashref argument lists. The replacement must provide an equivalent but less hacky replacement. -- David Nicol 816.235.11

Re: Apoc2 - concerns

2001-05-04 Thread David L. Nicol
if we kept <> with their current meaning but added it as a handier whitespace quoter I would like that. p5: @things = < one two three four five>; _is_ currently a syntax error. In my mind. Not in my 5.005_03. however, where it appears to behave just like qw does, except that it does in

Re: Apo2: \Q ambiguity not a problem

2001-05-04 Thread David L. Nicol
Not a problem. \Q means quotemeta, except immediately following a interpolated identifier. You want to start metaquoting immediately after a curious interpolation? use \Q\Q. I have been regularly, since I fingured out how, doing things like print "the time is now ${\(~~localtime)}[

apo 2

2001-05-03 Thread David L. Nicol
I am going to miss doublequoting being the default quoting for here strings. I find that to be a very nice optimization and would like to know more about the reasoning behind taking it away. I worry that official standard p6 will be more difficult to use than official standard p5. --

Re: Please make "last" work in "grep"

2001-05-03 Thread David L. Nicol
> > It also reminds me of mjd's mention of: my($first) = sort {...} @list; > > being O(n) if Perl were really Lazy. > > But it would need a completely different algorithm. Which is not too > bad. And even > > my ($first, $second, $third) = sort {...} @list; > > is kind-of plausible. So

sandboxing

2001-05-03 Thread David L. Nicol
In all the discussion of customizing the parser, let us not forget that we also need to be able to limit the parser. The "Penguin" module offers one interface for doing that. But the larger question remains, is sandboxing something a language should support at all, or is it best left to the O

Re: Please make "last" work in "grep"

2001-05-02 Thread David L. Nicol
Graham Barr wrote: > How this cooperates with lazy is a different matter entirely. > > Graham. http://dev.perl.org/rfc/123.html#Assigning_from_lazy_lists suggests that assigning to a sized busy array from a lazy array will fill it and stop. -- David Nicol 816.235.1187 [

Re: Strings vs Numbers (Re: Tying & Overloading)

2001-04-29 Thread David L. Nicol
Bart Lateur wrote: > Yeah. But no cheers then. The problem still remains: you can access a > hash in the normal way in plain code, but inside a sub, you can mainly > only access a passed hash through a reference. > > ... > > Are you going to provide a simpler aliasing mechanism to turn a hash >

Re: a modest proposal Re: s/./~/g

2001-04-27 Thread David L. Nicol
Jonathan Scott Duff wrote: > > I'd rather it be "cc" or "_" (I didn't like the underscore at first, > but it's grown on me a little) Comparing ~ and _ to available editors markup marks, _ is closer to the sideways () that an editor might use to indicate that two words should be joined together.

Re: s/./~/g

2001-04-25 Thread David L. Nicol
Eric Roode wrote: > > > >What is it about . that seems to inspire allergic reactions in people? > >Surely it's not the . itself, but the requirement that you fit everything > >into that one syntactic mold. Perl's not going to do that. > > No, more like ". is already used for something". The onl

Re: Strings vs Numbers (Re: Tying & Overloading)

2001-04-25 Thread David L. Nicol
John Porter wrote: > We could y/$@%/@%$/ ... ... and create an alternate parser able to handle the full internal internals API. I have finally figured out the main motivation behind the whole perl6 effort: the obfuscated perl contests were getting repetitive. Good night.

Re: how about just juxtaposing? (Re: Sane "+" string concat proposal)

2001-04-24 Thread David L. Nicol
Ah.. I knew I'd find the thread in here somewhere. The problems go away if you allow white space to signify. > [...] Consider > > print "Foo" > foo("bar"); > > Did the author forget a semi-colon, or did they intend to concatinate > there? Also, consider this... they for

C or SH like string cat proposal

2001-04-24 Thread David L. Nicol
1: use adjacency w/o white space for string cat. 2: allow, as in C, consecutive double-quoted strings with no intervening tokens (i.e. just whitespace and comments) to be considered as one string 3: as Uri pointed out, it's all syntactic sugar for convolutions of C That means,

Re: Tying & Overloading

2001-04-24 Thread David L. Nicol
Larry Wall wrote: > (And juxtaposition is out because we're not going to destroy indirect > object syntax How often is indirect object syntax used without some whitespace? Having the perl5->perl6 converter locate it and insert a space shouldn't be too very tricky. $these=$this$that$the_

  1   2   3   >