Re: How do you do a lazy map?

2008-09-07 Thread John M. Dlugosz
Moritz Lenz moritz-at-casella.verplant.org |Perl 6| wrote: map *is* lazy, as are all list builtins that can be lazy (which doesn't include stuff like sort, which has to look at all items anyway). Are you sure that it doesn't imply order of evaluation by default? I'm all for it (to be diff

How do you do a lazy map?

2008-09-07 Thread John M. Dlugosz
Consider something like a 'map' call, only I want it to be lazy. I know that a list can contain internally iterators that generate elements as needed or perhaps in the background. But how do you create such a thing? Something like: @lazy_list := parallel-map { get_info($_) } @filenames;

Re: What happened to "err" operator?

2008-09-07 Thread John M. Dlugosz
TSa (Thomas Sandlaß) thomas-at-sandlass.de |Perl 6| wrote: a() proceed: orelse b(); CATCH { ... # make $! into return value goto proceed; } This kind of needs to know the variable the return value of a() is stored into. This is easy if orelse is checking $! anyway. But do

Re: Conceptual question on exception in S04

2008-09-06 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: No, just the new exception, which merely has to contain the old unhandled exceptions somehow in case the user wants more information. OK, so it's more like the "inner exception" in Microsoft's .NET framework. My C++ exceptions have always had t

Re: [perl #58626] default and when * execute even when another when clause is used

2008-09-06 Thread John M. Dlugosz
The when statements are just like if statements. After executing one, it goes on to the following statement which does not have to be a conditional statement. That is, you can mix when statements with plain unconditional statements. If multiple when conditions match, it runs all of them. It

Re: new 'failthrow' branch for Failure/exception testing

2008-09-05 Thread John M. Dlugosz
Patrick R. Michaud wrote: If I understand S04 correctly, C should return a Failure object with an unthrown and unhandled exception, and attempting to use the value of the Failure object immediately throws the exception. So, the above call to C needs to be changed, or we need to make C smart enou

Conceptual question on exception in S04

2008-09-03 Thread John M. Dlugosz
I'm trying to work out some details of this area, but I don't understand what S04 is trying to say. Could someone please point me in the right direction? I'd be happy to then edit the S04 to contribute. In S04, the "Exceptions" section mentions that $! contains multiple exceptions. So what

Re: What happened to "err" operator?

2008-09-03 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: a() orelse b() you might want to: succeed on a() trap mild failure of a() and try to succeed on b() instead fail completely on drastic failure of a() At the moment this three-way distinction depends on whether a() returns defined/unde

Re: how much detail can I get from caller.want?

2008-08-31 Thread John M. Dlugosz
dpuu dave-at-whipp.name |Perl 6| wrote: On Aug 30, 8:47 am, [EMAIL PROTECTED] (John M. Dlugosz) wrote: Have the sort function simply return a lazy list object. When the [4] is called on that object, it knows to do as much work as needed, and can leave the rest as lazy. That may be

What happened to "err" operator?

2008-08-31 Thread John M. Dlugosz
Has the "err" operator, as a low-precidence version of //, been removed? It's not mentioned in S03, and the semantics of "orelse" is different. Is "orelse" supposed to be a direct replacement, meaning if you ignore the parameter thing then it doesn't change anything?

Exception Basics

2008-08-31 Thread John M. Dlugosz
In S04, the "Exceptions" section mentions that $! contains multiple exceptions. So what type is it? Why isn't it @! ? I says that they are thrown as a single new exception. So what type is that new exception? A multi-exception of some kind? How do you get multiple pending exceptions in th

S*.pod edits submissions

2008-08-31 Thread John M. Dlugosz
I have changed files at waiting for someone in authority to merge.

Re: how much detail can I get from caller.want?

2008-08-30 Thread John M. Dlugosz
Have the sort function simply return a lazy list object. When the [4] is called on that object, it knows to do as much work as needed, and can leave the rest as lazy. --John Dave Whipp dave-at-whipp.name |Perl 6| wrote: Lets say I want to find the 5th smallest element in an array. I might wr

Re: new method question

2008-08-22 Thread John M. Dlugosz
Moritz Lenz moritz-at-casella.verplant.org |Perl 6| wrote: Attributes need to have a twigil, so it would be has $.name The syntax has $name; with no twigil is legal according to S12. Perhaps the original poster (Xiao Yafeng) might like to read

metamethod contradictions in S12

2008-08-13 Thread John M. Dlugosz
Around line 477, it explains that our $count; method ^count { return $count } Such a I is always delegated to the C object just as methods like C<.does> are, so it's possible to call this as C or C<$dog.count>. However, around line 1983 it

Re: Allowing '-' in identifiers: what's the motivation?

2008-08-12 Thread John M. Dlugosz
Nicholas Clark nick-at-ccl4.org |Perl 6| wrote: Also, in Perl 6, constants aren't going to be bare words, because unlike Perl 5, they're not going to be implemented as subroutines. So that's another "obvious" thing that actually isn't going to matter here. A C in Perl 6 can be declared with or

Re: class member declaration catalog

2008-08-11 Thread John M. Dlugosz
Joe Gottman jgottman-at-carolina.rr.com |Perl 6| wrote: What happened to the "let" and "temp" declarators? They are not declarators in the same sense as my/our. They cause a run-time action to occur on existing variables. --John

class member declaration catalog

2008-08-10 Thread John M. Dlugosz
I just put together as part of my analysis and documentation effort. I'll link the "meanings" to more extensive treatments. Did I miss any *possible* combination? --John

Class attribute declaration question : our $!var

2008-08-10 Thread John M. Dlugosz
our $.var — class attribute, accessor, inheritable. our $!var — class attribute, no accessor, inheritable. If the second form has no accessor, how can it be inheritable?

Re: Allowing '-' in identifiers: what's the motivation?

2008-08-10 Thread John M. Dlugosz
Austin Hastings Austin_Hastings-at-Yahoo.com |Perl 6| wrote: At a minimum, there are more multi-word identifiers than there are statements involving subtraction. Further, '-' is basic, while all of [_A-Z] are not. Ergo, a multi-word-identifier is easier to type than a multi_word_identifier or

Re: Some details of function return captures

2008-08-10 Thread John M. Dlugosz
TSa (Thomas Sandlaß) thomas-at-sandlass.de |Perl 6| wrote: ... my $x = |$obj.foo(1,2); #4 to keep the ReturnCapture, and call it later either explicitly $x.resume(3); or implicitly $x = 3; Hope that helps, TSa. Interesting idea, as an alternative to get/set methods like

Allowing '-' in identifiers: what's the motivation?

2008-08-10 Thread John M. Dlugosz
E.g. see : sub bar { return 100; } sub foo { 50;} sub foo-bar { return rand(50); } if (foo - bar != foo-bar) { print "Haha!\n"; }

Quick questions on classes re S12

2008-08-09 Thread John M. Dlugosz
1) How do you declare a private method? I see how you call one, but not how to define one. 1b) Is the intent that $!foo without an explicit invocant refers to self, as opposed to $.bar or .bar which refers to $_ ? 2) re: has $brain; # also declares $!brain; Does that mean that $brain by

Multiple Return Values - details fleshed out

2008-08-09 Thread John M. Dlugosz
I wrote to clarify and extrapolate from what is written in the Synopses. --John

Re: List of captures, why?

2008-08-08 Thread John M. Dlugosz
Brandon S. Allbery KF8NH allbery-at-ece.cmu.edu |Perl 6| wrote: On 2008 Aug 8, at 23:06, John M. Dlugosz wrote: Why is 3;3;3 a list of captures rather than a list of lists? IIRC it has to do with providing enough information for slices and/or * to work in multiple dimensions. So how

List of captures, why?

2008-08-08 Thread John M. Dlugosz
Why is 3;3;3 a list of captures rather than a list of lists? --John

Quick question: (...) vs [...]

2008-08-08 Thread John M. Dlugosz
What is the difference between (1,2,3) and [1,2,3] ? --John

Differential Subscripts

2008-08-08 Thread John M. Dlugosz
How is @array[*-2] supposed to be implemented? S09 // reported again 8-Aug-2008 Is this magic known to the parser at a low level, or is it possible to define your own postcircumfix operators that interact with the interpretation of the argument? Does this use of * apply to any user-defined p

Re: Some details of function return captures

2008-08-08 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: If such a ReturnCapture could also be preliminary of some kind, then lvalue subs could be lazily resumed when the rvalue comes in. Can you elaborate on that? I don't follow. Also infix: needs a lazy item that is collapsed into Int, Num or Ra

Re: [svn:perl6-synopsis] r14573 - doc/trunk/design/syn

2008-08-08 Thread John M. Dlugosz
Don't forget I still have edits posted at . larry-at-cvs.perl.org |Perl 6| wrote: Author: larry Date: Fri Aug 8 07:59:12 2008 New Revision: 14573 Modified: doc/trunk/design/syn/S02.pod doc/trunk/design/syn/S06.pod doc/trunk/design/syn/S13.pod

Some details of function return captures

2008-08-08 Thread John M. Dlugosz
I was trying to figure out exactly how Captures manage to stay invisible even though functions return them, yet still let you use Capture objects when you want to. Please see my conclusions at . The Summary at the very bottom clarifies the Synopse

Re: Humorous but serious article

2008-08-08 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: HaloO, John M. Dlugosz wrote: See my latest creation at <http://www.dlugosz.com/Perl6/web/APL.html> Nice write-up! You say that there's no syntax for refering to a multi as a whole. But is that not simply the short name? E.g. infix

Re: new article, "A Romp Through Infinity"

2008-08-08 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: HaloO, [EMAIL PROTECTED] wrote: Let's just make sure we're handling inf and -inf right and leave all that other stuff until later. The point is: what is the minimum we need to be future proof and compatible to other language features. Regards

Re: new article, "A Romp Through Infinity"

2008-08-08 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: Could we get confirmation for that from @Larry. I remember $Larry mentioning that Num fails over to Rat or so when necessary. IOW, does my Rat $rat = 1/3; # assuming infix: returns a Rat my Num $num = 1/3; my Rat $diff = abs($rat - $n

Re: new article, "A Romp Through Infinity"

2008-08-08 Thread John M. Dlugosz
Xavier Noria fxn-at-hashref.com |Perl 6| wrote: IMO to include something related to infinity you need to stick with some particular model and forget the rest. I couldn't have said it any better.

Re: windows XP copyfile

2008-08-08 Thread John M. Dlugosz
Seek the wisdom of the Perl Monks at www.perlmonks.org. Short answer: http://perldoc.perl.org/functions/-X.html -M gives the file age. --John Tara taralish-at-yahoo.com |Perl 6| wrote: I'm trying to do a Perl script (PC has Perl5 installed) in a BAT file which will open the CMD prompt, interac

Re: new article, "A Romp Through Infinity"

2008-08-07 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: As I recall, it can handle the concept of Inf-1 etc. Yes. But the Hyperreals do the same and stay within the realm of set theory. I'm not sure. A quick reading indicates that ⋆ℝ contains "infinitely large" numbers that maintain the properti

Another adverb on operator question

2008-08-07 Thread John M. Dlugosz
What about adverbs on reduction operators? [lt :lc] $a,$b,$c # all in decreasing order --John

Humorous but serious article

2008-08-07 Thread John M. Dlugosz
See my latest creation at

Re: adverbs o operators

2008-08-07 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: > As for > marking each op individually, it might be possible if we add a > whitespace dependency between "lt:lc" and "lt :lc", but 1 ..:by(2) 100 > is pretty ugly. > > Larry So do they have to go at the end of the whole expression in the current gram

Re: new article, "A Romp Through Infinity"

2008-08-06 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: Firstly, shouldn't there also be infinite strings? E.g. 'ab' x Inf is a regularly infinite string and ~pi as well. Other classes might have elaborate notions of infinity. A string whose length is Inf is not itself equal to Inf. But $s.chars > $b

Re: Catching exceptions with the // operator

2008-08-06 Thread John M. Dlugosz
Yaakov Belch perl6-at-yaakovnet.net |Perl 6| wrote: Let me explain why this is useful and why I think this is "the right thing": First of all, it provides a very light-weight exception handling using well-known ideoms like: $file_content=read_file($filename) // $default_value; compute_statist

Re: Edits to submit - Routine/Callable

2008-08-05 Thread John M. Dlugosz
Audrey Tang audreyt-at-audreyt.org |Perl 6| wrote: Audrey Tang 提到: However, in S02 you removed the Code class and replaced it with Routine, but that does not really work; for example, a bare block is a Code, but it cannot be a Routine since it can't be wrapped in place, and caller() would bypa

syntax question: "method close is export ()"

2008-08-05 Thread John M. Dlugosz
Does that mean that traits can come before the signature? Or should it be corrected to method close () is export { ... } ?

Class Name Question

2008-08-05 Thread John M. Dlugosz
In S12, "So when you say "Dog", you're referring to both a package and a protoobject, that latter of which points to the actual object representing the class via HOW." Does that mean that the object referred to by Dog "does" both roles? In that case "the latter" is confusing wording. Or doe

new article, "A Romp Through Infinity"

2008-08-04 Thread John M. Dlugosz
This weekend I wrote which explains the Inf features of Perl 6, but drills down each example to reach the most fundamental language features, which it explains. It should be interesting to those just taking the plunge to Perl 6 because so m

Re: "Code-only forms"?

2008-08-02 Thread John M. Dlugosz
same thing if executed on an implementation that actually generated block-like thunks or one that used machine level goto instructions to jump around the conditional code without changing contexts. --John Larry Wall larry-at-wall.org |Perl 6| wrote: On Thu, Jul 31, 2008 at 05:56:14AM -0500, Joh

Edits to submit

2008-08-02 Thread John M. Dlugosz
I've edited several of the S??.pod files,but I have not heard back from the owner ($Larry, whose name is on the top of the file) about accepting merging or rejecting my changes. I've posted the files to so they don't get lost, until someone with author

"returns" keyword - current meaning?

2008-08-01 Thread John M. Dlugosz
According to S02, "The word returns is allowed as an alias for of." and "The as property specifies a constraint to be enforced on the return value ..., is not advertised as the type of the routine" However, S06 states, " returns/is returns The inner type constraint that a routine imposes

Re: Design of the "code" classes

2008-07-31 Thread John M. Dlugosz
Moritz Lenz moritz-at-casella.verplant.org |Perl 6| wrote: I think what the discussion is missing that there Regexes are also Callable (I think so, at least). Yes, you are right. S05 says that a named regex is an object of type Method actually. They are just another syntax for writing Rules.

"Code-only forms"?

2008-07-31 Thread John M. Dlugosz
In S04, "Other similar Code-only forms ..." What does that mean?

continuation taken?

2008-07-31 Thread John M. Dlugosz
In S04, "Note that temporizations that are undone upon scope exit must be prepared to be redone if a continuation within that scope is taken." What will create a continuation there and how do you take it? That is, how will this ever happen? --John

Re: Project idea: Perl 6 syntax hilighting with STD.pm

2008-07-29 Thread John M. Dlugosz
Does that mean there is a tool I can use to apply STD.pm to syntax-check my examples or ask questions of it? Can you point to that? --John Moritz Lenz wrote: Since now STD.pm parses most Perl 6 code now, and spits out a parse tree in YAML, a brave soul might want to write a syntax hilighter

value type vs implementation type of '&' variables

2008-07-29 Thread John M. Dlugosz
It seems to me that the only type held by a '&' variable is treated as the container type. And, the value type in such a declaration is uniformly used as a function return type. Is that correct? So if the most basic declaration is my &func; then my Int &func; means that whatever fun

Design of the "code" classes

2008-07-28 Thread John M. Dlugosz
I wrote up a summary and some notes and posted at . Can we come to a definitive statement of the Callable/Code/Block/Routine types, relative to the hints that are in the synopses thus far? What I would like to do is get a consensus to write this up

Re: The Inf type

2008-06-03 Thread John M. Dlugosz
Jon Lang dataweaver-at-gmail.com |Perl 6| wrote: e . Learn from the Haskell folks, who are still trying to untangle the mess they made of their numeric hierarchy (see http://haskell.org/haskellwiki/Mathematical_prelude_discussion). I'll look it over. That said, note that we're not

Re: The Inf type

2008-06-03 Thread John M. Dlugosz
Jon Lang dataweaver-at-gmail.com |Perl 6| wrote: ; I see. We just had a role-vs-class cognitive disconnect. Officially, Num is the autoboxed version of the native floating point type (i.e., 'num'). Somehow, I had got it into my head that Num was a role that is done by all types that represent v

Re: The Inf type

2008-06-03 Thread John M. Dlugosz
Jon Lang dataweaver-at-gmail.com |Perl 6| wrote: TSa wrote: John M. Dlugosz wrote: The sqrt(2) should be a Num of 1.414213562373 with the precision of the native floating-point that runs at full speed on the platform. That makes the Num type an Int with non-uniform spacing. E.g

Re: Private methods in classes and roles

2008-05-16 Thread John M. Dlugosz
Moritz Lenz moritz-at-casella.verplant.org |Perl 6| wrote: S12 says (in the context of classes): my method think (Brain $self: $thought) (Such methods are completely invisible to ordinary method calls, and are in fact called with a different syntax that uses ! in place of the . character.

Re: "All classes imply the existence of a role of the same name."

2008-05-16 Thread John M. Dlugosz
Kealey, Martin, ihug-NZ Martin.Kealey-at-vodafone.com |Perl 6| wrote: In Java, "final" is used to denote both a *class* that can't change (extend), and *value* that can't change (a constant member of the class). Got it: on a value it means readonly. --John

Re: assignable mutators (S06/Lvalue subroutines)

2008-05-16 Thread John M. Dlugosz
Brandon Allbery allbery-at-kf8nh.com |Perl 6| wrote: S06/Lvalue subroutines: "Lvalue subroutines return a proxy object that can be assigned to. (...)" S13/Methods: "Setter methods that expect the new value as an argument do not fall into the well-behaved category, however." When I take the

Re: "All classes imply the existence of a role of the same name."

2008-05-15 Thread John M. Dlugosz
Overloading "final" was Java's rather inept attempt to define objects with value semantics rather than container semantics Can you tell me more about that, or point to something?

Re: parameters: ref vs rw

2008-05-10 Thread John M. Dlugosz
Brandon S. Allbery KF8NH allbery-at-ece.cmu.edu |Perl 6| wrote: On 2008 May 10, at 21:46, John M. Dlugosz wrote: In S06, what is the difference between "is ref" and "is rw"? The text says that the rw may be converted to an lvalue, and that ref must already be. But what

parameters: ref vs rw

2008-05-10 Thread John M. Dlugosz
In S06, what is the difference between "is ref" and "is rw"? The text says that the rw may be converted to an lvalue, and that ref must already be. But what is that supposed to mean? --John

Re: Compile-time checking of assignment to read-only variables

2008-05-10 Thread John M. Dlugosz
Patrick R. Michaud pmichaud-at-pobox.com |Perl 6| wrote: Reasonable to expect it, yes -- but whether or not this rises to the level of being a "requirement in the spec" may be a different matter. I could envision the possibility that some otherwise-very-capable Perl 6 implementation might be bet

Re: Compile-time checking of assignment to read-only variables (Re: MMD distances)

2008-05-09 Thread John M. Dlugosz
Carl Mäsak cmasak-at-gmail.com |Perl 6| wrote: Pm (>): In Rakudo's case, we just haven't implemented read-only traits on variables yet. Goodie. I guessed as much. But yes, I expect that it will be caught as a compile-time error. And do you agree it's reasonable to expect t

Re: The Inf type

2008-05-09 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: E.g. sqrt(2) might return a special Inf that can be lazily stringified to an arbitrary long sequence of digits of sqrt(2). ??? The sqrt(2) should be a Num of 1.414213562373 with the precision of the native floating-point that runs at full spe

Re: MMD distances

2008-05-08 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: It's called overload resolution. Perl 6 can't do that at compile time unless *all* targets are available as rw and readonly variants. I don't follow that statement. Can you give an example?

MMD distances

2008-05-08 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: Coming back to how C++ handles static overloading. How is the sort order of (int *), (int &), (int), (const int *), (const int &), (const int), (int * const) and (const int * const)? I'm too lazy to look up the details, sorry. Without looking a

[English] what is a flack? (Re: Minimal Distance)

2008-05-08 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: When I mentioned this before, there was big flack over mentioning the way C++ did it. I think that must have been miscommunicated, since I wasn't even talking about summing all the arguments when he brought up "Manhattan dispatch". BTW, what

Re: Minimal Distance (Re: Where is "Manhattan Dispatch" discussion?)

2008-05-06 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: On Tue, May 06, 2008 at 08:20:40PM +0200, TSa wrote: HaloO, John M. Dlugosz wrote: In C++, which must be resolved at compile time, the overloading resolution mechanism demands that =every= parameter be at least as good of a match, and one

Re: MMD thoughts 2008

2008-05-06 Thread John M. Dlugosz
Sorry, you're not following me at all. I'll try again later. TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: HaloO, John M. Dlugosz wrote: OK, why would someone create those forms in the first place? I would think they grow like that historically. A five steps long subtyping ch

Re: Minimal Distance (Re: Where is "Manhattan Dispatch" discussion?)

2008-05-06 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: HaloO, John M. Dlugosz wrote: In C++, which must be resolved at compile time, the overloading resolution mechanism demands that =every= parameter be at least as good of a match, and one strictly better match. So the implementation never

Class Building

2008-05-06 Thread John M. Dlugosz
Building a class definition is an activity performed by Perl code that runs at compile time. Could you take a quick look at Section 2 in and make sure that view is orthodox according to @Larry? Then I will collect details that have been discuss

Minimal Distance (Re: Where is "Manhattan Dispatch" discussion?)

2008-05-06 Thread John M. Dlugosz
Mark A. Biggar mark-at-biggar.org |Perl 6| wrote: To do multi method dispatch, you want to select the method that best matches the parameters in the call. One way to do that is to define a measure for distances between types and they use the method that's at the minimum distance. One simple

MMD thoughts 2008

2008-05-06 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: The fundamental flaw of metric mmd is that it trades degrees of specificity. Consider the subtype chain E <: D <: C <: B <: A where the rule is that having an E it is better handled by a method dealing with a D than one dealing with an A. The same

Re: Where is "Manhattan Dispatch" discussion?

2008-05-06 Thread John M. Dlugosz
I'm still in the dark... I find an positions for "manhattan distance" but no definition of what that is. I did find the alternative pod page earlier. --John Ovid publiustemp-perl6language2-at-yahoo.com |Perl 6| wrote: --- "John M. Dlugosz" <[EMAIL PROTECTED]&g

Re: nested 'our' subs - senseless?

2008-05-05 Thread John M. Dlugosz
Jon Lang dataweaver-at-gmail.com |Perl 6| wrote: On Mon, May 5, 2008 at 6:01 AM, John M. Dlugosz <[EMAIL PROTECTED]> wrote: TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: No, because {...} is just a declaration. You can give a definition later in the surrounding module/package

Re: New specdoc available

2008-05-05 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: In "24.28.1 abs" you define our ::?CLASS multi method abs ( $x: ) I would rather nail down the return type to 'Num where {$_ >= 0}'. The latter might also get a nice name, e.g. Abs. This in turn would make the abs multi method/sub kind of redu

Re: nested 'our' subs - senseless?

2008-05-05 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: No, because {...} is just a declaration. You can give a definition later in the surrounding module/package/class. Within that scope there can be only one definition, of course. I did not mean to use { ... } to mean declaration only, but to show

not a reference - What does this mean?

2008-05-04 Thread John M. Dlugosz
Perl 6 doesn't have references anymore, it has captures. So, what does the following mean: @x = ; $a = [1, 2, [EMAIL PROTECTED]; I imagine that the 3rd element of the Array is itself an Array, and is the same object that is bound to @x. But captures are lazy context-sensitive beasts, so I w

Where is "Manhattan Dispatch" discussion?

2008-05-04 Thread John M. Dlugosz
I want to review and collect the wisdom of what has been discussed before. Someone mentioned this the other day, as being a significant consensus. But I can't find anything in the forum archives. Can someone point to the discussion, position papers, etc.? --John

Re: grammar for 'constant' ?

2008-05-04 Thread John M. Dlugosz
Moritz Lenz moritz-at-casella.verplant.org |Perl 6| wrote: Then in S12 it shows my constant ... and our constant ... that is, independant from the my or our declarator. I grep'ped STD.pm tentatively for other occurrences of 'constant', and couldn't find where that should be imple

Re: What does 'eqv' do exactly?

2008-05-03 Thread John M. Dlugosz
Jon Lang dataweaver-at-gmail.com |Perl 6| wrote: I suspect that at the core of John's question is the fact that nobody has ever actually said what 'snapshot semantics' is: it's a term that's been tossed around with the assumption that people already know its meaning. My own understanding of it i

Re: What does 'eqv' do exactly?

2008-05-03 Thread John M. Dlugosz
Adriano Ferreira a.r.ferreira-at-gmail.com |Perl 6| wrote: On Sat, May 3, 2008 at 4:00 PM, John M. Dlugosz <[EMAIL PROTECTED]> wrote: I've searched the archives, but did not see a good explanation of what eqv does, and what is meant by snapshotting in the description of the syno

nested 'our' subs - senseless?

2008-05-03 Thread John M. Dlugosz
What does this mean? our sub outer () { ... our sub inner () { ... } } inner; # defined? I think this should be illegal. Nested named subs makes sense for 'my', with the rules of visibility matching the ability to clone the closure. But putting the nested sub into package scope

What does 'eqv' do exactly?

2008-05-03 Thread John M. Dlugosz
I've searched the archives, but did not see a good explanation of what eqv does, and what is meant by snapshotting in the description of the synopses. Can anyone explain it (with examples?) or point to an existing treatment, please? --John

grammar for 'constant' ?

2008-05-03 Thread John M. Dlugosz
The synopses are contradictary over the way 'constant' works. First it says that it is a declarator like 'my'. Then in S12 it shows my constant ... and our constant ... that is, independant from the my or our declarator. Assuming the second way is newer/better, what is the grammar for t

Class question: what is (my $!var) ?

2008-05-03 Thread John M. Dlugosz
I've come back to this: my $!var — class attribute, no accessor, not inheritable. How is this different from a normal lexical variable? Role composition can show differences? What's the point? our $!var — class attribute, no accessor, inheritable. But private variables are not inherited.

Re: First look: Advanced Polymorphism whitepaper

2008-05-02 Thread John M. Dlugosz
Jonathan Worthington jonathan-at-jnthn.net |Perl 6| wrote: $x.nosuchmethod; will give a compile-time error if nosuchmethod is not declared as part of CGI::Simple. Is this spec'd somewhere? I don't think we can statically know what methods CGI::Simple will have at compile time. What if I do a "

Re: treatment of "isa" and inheritance

2008-05-02 Thread John M. Dlugosz
Jon Lang dataweaver-at-gmail.com |Perl 6| wrote: IIRC, the supertyping proposal involved being able to "anti-derive" roles from existing roles or classes, working from subtypes to supertypes (or from derived roles to base roles) instead of the other way around. The proposal got hung up on termin

Re: First look: Advanced Polymorphism whitepaper

2008-05-02 Thread John M. Dlugosz
chromatic chromatic-at-wgz.org |Perl 6| wrote: Do we face a similar rug-yanking situation with delegatee classes being modified after delegate instantiation? I know there are some types of auto-handling, but are they all automatic? -- c In the sense that the more detailed formal documen

Re: "All classes imply the existence of a role of the same name."

2008-05-02 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: On Fri, May 02, 2008 at 12:22:00PM -0700, chromatic wrote: : On Friday 02 May 2008 11:44:40 John M. Dlugosz wrote: : : > chromatic chromatic-at-wgz.org |Perl 6| wrote: : : > > All classes imply the existence of a role of the same name. : :

Re: First look: Advanced Polymorphism whitepaper

2008-05-02 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: Would you be so kind to enlighten me what the type system is, if not a type calculation overlaid over a value calculation? Regards, TSa. The other day I put it for those not following the scholarly stuff: The questions of “can this substitute

Re: First look: Advanced Polymorphism whitepaper

2008-05-02 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: If a role is derived from a class, According to S12: "A role may not inherit from a class..." it must of necessity be a snapshot of the class, because roles are immutable, while classes are not. The only interesting question in my mind is whethe

Re: "All classes imply the existence of a role of the same name."

2008-05-02 Thread John M. Dlugosz
chromatic chromatic-at-wgz.org |Perl 6| wrote: http://www.perlfoundation.org/perl6/index.cgi?perl_6_people I could edit it into a Synopsis if you really want. -- c Or just explain the reasoning that's missing now. Why is there any difference in declaring classes and roles if a class can

Re: First look: Advanced Polymorphism whitepaper

2008-05-02 Thread John M. Dlugosz
Andy_Bach-at-wiwb.uscourts.gov |Perl 6| wrote: in. Er, so would: my CGI::Simple $x .= new; my $y = CGI::Simple.new; mean that: $x $y is not true? Or would there be a way to tell them apart, on a class (?) level. The actual dynamic type at run time of the values in $x and $y are both

Re: First look: Advanced Polymorphism whitepaper

2008-05-02 Thread John M. Dlugosz
mark.a.biggar-at-comcast.net |Perl 6| wrote: For me, too. But note that we should keep does the ultimate type checker that first checks the declared presence of a role, then falls back to a declared class inheritance and then falls back to a declared emulation. What else should be in this check

Re: "All classes imply the existence of a role of the same name."

2008-05-02 Thread John M. Dlugosz
chromatic chromatic-at-wgz.org |Perl 6| wrote: On Friday 02 May 2008 07:08:21 John M. Dlugosz wrote: TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: Then, since classes are open, the programmer can easily say CGI does CGI::Simple; That would be class CGI is also

Re: Polymorphism and Representations

2008-05-02 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: Where do you get the information from that the second is more specific than the former? Consider constant Num $c = 3; # Num here is funny my Num $n = 3; my Int $i = 3; my Any $a = 3; And now $i is more specific than

<    1   2   3   4   >