Getting Started - Synopsis

2008-03-30 Thread John M. Dlugosz
I've read copies of the Synopsis documents that I've found on the web somewhere. How do I synchronize with the life copies, and hack on them? --John

Getting Started - What to try?

2008-03-30 Thread John M. Dlugosz
I've installed the Win32 build of Pugs, but is appears to be incomplete. How do I get the real thing? I've also heard that Pugs is in stasis, so is this still a good way to write stuff and learn today? Likewise, how do I get synched up with the Parrot implementation? I understand the most

S02 questions and comments

2008-03-30 Thread John M. Dlugosz
I'm reading S02.pod with version information: Last Modified: 17 Mar 2008 Number: 2 Version: 130 Meta-question 1: what is the succinct way to report this? Is the Version 130 enough? Meta-question 2: Does this belong on a different mailing list? I'm also including the documented file

S02 questions and comments - unspace

2008-03-30 Thread John M. Dlugosz
Any contiguous whitespace (including comments) may be hidden from the parser by prefixing it with code\/code. ... using unspace lets you line up postfix operators: %hash\ .{$key} @array\ .[$ix] $subref\.($arg) What does the dotted form have to do with this? It just confuses the

podhtml.pl

2008-03-31 Thread John M. Dlugosz
From: Agent Zhang IMHO pod2html is old and broken in various ways. I think you should use the tools provided by Pod::Simple instead. For the Synopses on feather, we're using the podhtml.pl script (based on Pod::Simple::HTML): http://svn.pugscode.org/pugs/util/podhtm.pl Hopefully you

Question on your last change to S02

2008-03-31 Thread John M. Dlugosz
The context in which a subscript is evaluated is no longer controlled by the sigil either. Subscripts are always evaluated in list context. +(More specifically, they are evaluated in a variant of list context +known as Islice context, which preserves dimensional information +so that you can do

Buf/Str conversion functions

2008-03-31 Thread John M. Dlugosz
In S02, If a buf type is initialized with a Unicode string value, the string is decomposed into Unicode codepoints,...If any other conversion is desired, it must be specified explicitly. In S29, there is nothing about functions in Buf, and nothing about functions that convert or initialize

muse on Compact Structs, pack/unpack

2008-04-01 Thread John M. Dlugosz
#[ are there people paying attention to these issues on other mailing lists? ] = on Compact structs revision 1, initial posting What functions serialize/deserialize to the C view? If these are to be member functions, they would be applicable only if the struct is compact, and erroneous to call

Re: muse on Compact Structs, pack/unpack

2008-04-01 Thread John M. Dlugosz
Brandon S. Allbery KF8NH allbery-at-ece.cmu.edu |Perl 6| wrote: $stream.print (Buf $record); $stream.print($record.pack) # I would think? Thank you so much for the reply. I was beginning to wonder if Perl 6 interest is dead, or if there is another secret lair for current enthusiasts

Re: muse on Compact Structs, pack/unpack

2008-04-01 Thread John M. Dlugosz
, 2008 at 12:25:50PM -0500, John M. Dlugosz wrote: Thank you so much for the reply. I was beginning to wonder if Perl 6 interest is dead, or if there is another secret lair for current enthusiasts that I'm unaware of. Sorry, many of us have to live under budgetary constraints of time

our methods?

2008-04-01 Thread John M. Dlugosz
In S29, there are definitions like our Capture method shape (@array: ) is export But in S12 there is no mention as to what an our method is. It states that my is used to make private methods, and ^ to make class methods. I think this is a doc relic and should be fixed globally in that

Re: Question on your last change to S02

2008-04-01 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: Now my question: could slice context be a runtime feature that acts before the dispatch to postcircumfix:[ ] by retrieving the shape of the @array and handing it over to foo as context, capture the shape of the slice returned and hand over the

S09 editorial fixes

2008-04-02 Thread John M. Dlugosz
I just finished another pass on S09v24, and in this posting I note editorial issues with the file that can easily be corrected. This is as opposed to subjects for deep discussion, which I'll save for later and individual posts. = on Mixing subscripts Within a C.[] indexing operation... Why the

Re: our methods?

2008-04-02 Thread John M. Dlugosz
I understand. Thank you. This ought to be mentioned in S12. Perhaps after the treatment on my, explain that our is the default, but saying it explicitly allows the return type to be first. --John Audrey Tang audreyt-at-audreyt.org |Perl 6| wrote: John M. Dlugosz 提到: In S29

Re: muse on Compact Structs, pack/unpack

2008-04-02 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: On Tue, Apr 01, 2008 at 09:27:48PM -0500, John M. Dlugosz wrote: Having done that before, I find the Perl 6 technical docs to be in relative disarray and imprecise. Indeed, I welcome all the help I can get on making things more precise. My

Re: S09 editorial fixes

2008-04-02 Thread John M. Dlugosz
today. --John Audrey Tang audreyt-at-audreyt.org |Perl 6| wrote: John M. Dlugosz 提到: = on Parallelized parameters and autothreading use autoindex; do { @c[$^i, $^j, $^k, $^l] = @a[$^i, $^j] * @b[$^k, $^l] }; Shouldn't those be semicolons? Ditto for subsequent examples. Also

Re: S09 editorial fixes

2008-04-02 Thread John M. Dlugosz
Audrey Tang audreyt-at-audreyt.org |Perl 6| wrote: I guess the wording in the last parenthesized parens is insufficiently explicit, and maybe we should change it to say that it's really a syntax error to use placeholder blocks in statement positions. Sounds reasonable? Cheers, Audrey

Re: Question on your last change to S02

2008-04-02 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: Now, you'll ask how *-2 works. If you do math on a Whatever object, it just remembers that offset until the Whatever is given a meaning, which, in this case, is delayed until the subscripting operator decides what the size of the next dimension is.

Re: Question on your last change to S02

2008-04-02 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: At compile time the subscript parser really only knows how many dimensions are referred to by how many semicolons there are. A subscript that is explicitly cast to @@ is known to be multidimensional, and interpolates the returned List of Capture into

S12v58 edits on Methods

2008-04-03 Thread John M. Dlugosz
If you declare an explicit invocant for an Array type using an array variable... Suggest: The invocant may be given a sigil other than the C$ item sigil using the same rules as binding variables to class types as described in S02 under Names and Variables. For example, if the class does the

Conceptual questions about Objects

2008-04-04 Thread John M. Dlugosz
After reading S12v58, I have many many notes about things that need to be tightened up or places that open more questions then provide answers. But, a lot of it boils down to a core set of issues. Can y'all explain these to me? Help me see the core concepts, and I can work out the details

Re: Conceptual questions about Objects

2008-04-04 Thread John M. Dlugosz
chromatic chromatic-at-wgz.org |Perl 6| wrote: It shouldn't be. So you are saying that in the example of class C { has $.a; method a ($self:) { side_effect(); return $self.a; } } # end C class D is C { method foo ($self:)

Re: Conceptual questions about Objects

2008-04-04 Thread John M. Dlugosz
Darren Duncan darren-at-darrenduncan.net |Perl 6| wrote: A method is defined within a role or class, as is an attribute. A private attribute can generally be referenced only by a method declared in the same role or class as said attribute. I think that's not right. A private attribute

Re: Conceptual questions about Objects

2008-04-04 Thread John M. Dlugosz
I understand your example. In fact, it further clarifies your earlier note. But that's not what I meant. I was thinking that access was through a variable, not understanding the real point of the syntax. Audrey Tang audreyt-at-audreyt.org |Perl 6| wrote: John M. Dlugosz wrote: That seems

Re: Conceptual questions about Objects

2008-04-04 Thread John M. Dlugosz
not be necessary in all cases? Or should that passage really say not in non-trusted classes, including derived classes? --John John M. Dlugosz wrote: OK, trust is not implicit on derived classes. Is that because there is no rule that says it is, or is there a mention of that somewhere

Re: Conceptual questions about Objects

2008-04-04 Thread John M. Dlugosz
Ryan Richter ryan-at-tau.solarneutrino.net |Perl 6| wrote: You've declared method a twice here. According to S12, You may write your own accessors to override any or all of the autogenerated ones. has $!a; method a { $!a } The variable is always really the $! form. I'm catching

Re: Conceptual questions about Objects

2008-04-04 Thread John M. Dlugosz
Many thanks. Larry Wall larry-at-wall.org |Perl 6| wrote: self!BaseName::attr should work, assuming BaseName trusts us. Because it is an accessor function, not a syntax to reference a variable in another scope. Got it. But see my q's to Audrey. Why does it need the qualified name if

understanding STD.pm

2008-04-05 Thread John M. Dlugosz
OK, you got me. What is the ¢ used for? For example, ?{ $¢.pos === $!ws_to }. I only see that character as used in this manner (a variable name?), never defined (e.g. as a variable or parameter) anywhere. --John

Re: postfix and postcircumfix

2008-04-05 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: On Wed, Apr 02, 2008 at 06:08:55PM -0700, Jon Lang wrote: : In Question on your last change to S02, Larry Wall wrote: : (By the way, you'll note the utility of being able to talk about a : postfix by saying .[], which is one of the reasons we

Easy question: what is a list comprehension ?

2008-04-05 Thread John M. Dlugosz
What is a list comprehension? I've seen that term bantered around here. --John

STD.pm

2008-04-05 Thread John M. Dlugosz
I'm trying to fathom STD.pm. Maybe someone can help me trace through this one? How is $obj!privA = 1; parsed? Reading expect_term, it trys noun, then variable sees the $ and commits to the decision, reads obj as a desigilname, then checks for a ., but doesn't have similar logic for !.

Re: postfix and postcircumfix

2008-04-06 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: I only mean that you can't simply rewrite $foo.($bar) as $foo.postcircumfix:( ).($bar) and think you've gotten anywhere, since you'd then have to rewrite it again: $foo.postcircumfix:( ).postcircumfix:( ).($bar)

What I'm Working On

2008-04-07 Thread John M. Dlugosz
I'm taking a stab at turning the S\d\d documents into a formal standard. Going through S02, each factoid gets filed away in a developing outline. I'm using a single ODT file to make it easy to manipulate the outline (currently mostly stubs). Here is an early effort to flesh out imprecise

Re: Protected data member access considered harmful

2008-04-07 Thread John M. Dlugosz
Thom Boyer thom-at-boyers.org |Perl 6| wrote: I believe Mr. Stroustrup's deprecation of 'protected' access applies only to data data members, not function members: Fortunately, you don't have to use protected data in C++; 'private' is the default in classes and is usually the better

Re: What I'm Working On

2008-04-08 Thread John M. Dlugosz
TSa Thomas.Sandlass-at- This hinges on the details how binding works. If it is pure name lookup then you can bind only variables of equal type. But $Larry has the idea of $x1 and $x2 being different views of the same underlying item. E.g. That's not at all the same kind of thing as briefly

failure notice

2008-04-09 Thread John M. Dlugosz
I've been working hard on re-organizing the S\d\d docs and other lore into a technical specification with an outline suitable for the contents. But lately I've done some original work on what strong typing means and the detailed semantics of having types. So, please take a look at section

Nomenclature Question - BEGIN etc.

2008-04-09 Thread John M. Dlugosz
Consider the words that may be used to introduce a block for a special purpose, like BEGIN END INIT CATCH etc. What do you call those? They are not even special named blocks because that is not the block name (that already means something). --John

Re: Nomenclature Question - BEGIN etc.

2008-04-10 Thread John M. Dlugosz
Mark J. Reed markjreed-at-mail.com |Perl 6| wrote: Now you've lost me. I was pretty sure that was the block name. AIUI, you can give arbitrary names to any block, and these names function the same way (i.e. can be used in flow control statements), but they also happen to control when the block

My specdoc (was Failure Notice)

2008-04-10 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: Just so you don't think this is warnocked, I'm looking at it, and thinking about it. Thanks. I thought perhaps everyone filtered it out since it had a bad subject line. By and large it seems to be going the right direction, though I've

Re: Nomenclature Question - BEGIN etc.

2008-04-10 Thread John M. Dlugosz
I've consolidated all the discussion into one reply: The perldocs call them Five specially named code blocks, The Camel names them individually (e.g. BEGIN block). How about phase blocks? They control in what phase of compilation/runtime the code runs in. I don't know, phase sounds too

episodes of execution

2008-04-10 Thread John M. Dlugosz
See my latest, in section 4.2, for a first cut on episodes. I took a first stab at formalizing all phases of translation and execution, and documented what was known about the episodes I knew about, especially those corresponding to keywords that introduce an episodic block (as a

Re: failure notice

2008-04-10 Thread John M. Dlugosz
It will always be too early, and too late. There will always be reasons not to do it till next year, and reasons you're hosed because it wasn't done years ago. Now is all we've got at the moment... Larry That's how C++ was. The call to ANSI was hot on the heels of a statement saying

syntax question on parameter lists

2008-04-10 Thread John M. Dlugosz
S06 shows how to define named-only parameters, marked with a prefix :. But no example shows anything more than a bare parameter name. No type is ever given! Looking through my copy of STD.pm, I'm baffled, as it seems not to take types in parameter lists at all. So, is it method bytes (

default parameters in methods

2008-04-10 Thread John M. Dlugosz
It is not specified in the Synopses as I recall, but I believe that this is useful enough that it must be made to work: method bytes (Encoding :$encoding = .encoding) returns Int or even method bytes (Encoding :$encoding = self!encoding) returns Int That is, a named-only

Re: default parameters in methods

2008-04-11 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: All default expressions to any parameter are defined to run in the context that assumes any parameters to their left are already bound, so you may safely depend on self already being set. OK, so there is no technical reason why it can't work

Symbolic references and OUTER

2008-04-11 Thread John M. Dlugosz
OUTER::$varname (S06, Out-of-scope names) $OUTER::varname (S02, Names) specifies the $varname declared in the lexical scope surrounding the current lexical scope (i.e. the scope in which the current block was defined). sub outersub () { my $a; my $b; my $closure = sub { say $a; # OK,

What is the self pragma?

2008-04-11 Thread John M. Dlugosz
In S06, A method's invocant always has the alias self. Other styles of self can be declared with the self pragma. What is the self pragma, and what are other styles of self, prey tell? --John

quick ones on subs

2008-04-11 Thread John M. Dlugosz
In S06, a wrong word: Alternately, optional fields may be marked by supplying a default value. should be parameters, not fields. Now here is my question: Params are bound in declaration order, not call order, and may refer to previous parameters. But what if a multi makes use of your

slurpy scalar parameter?

2008-04-11 Thread John M. Dlugosz
What is the difference between: sub head(*$head, [EMAIL PROTECTED]) and sub head($head?, [EMAIL PROTECTED]) ? The example calls it with head( 1,2,3,4 ); I'm thinking that there are differences that are not apparent in this example. --John

Question (mistake?) in S06 Multidimensional argument list binding

2008-04-12 Thread John M. Dlugosz
The section contrasts sub foo (*@@slice) { ... } sub foo (\$slice) { ... } but he latter is never explained anywhere. Did you mean to use | instead of \ in that section? If not, what am I missing?

Re: quick ones on subs

2008-04-12 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: What gives (in the sense of breaking) is the notion that you can do multiple dispatch on randomly ordered arguments. That's the main reason we invented proto multis, so that the compiler can rearrange supposedly randomly ordered arguments into

Clarify Design by Contract

2008-04-12 Thread John M. Dlugosz
PRE/POST on methods: When applied to a method, the semantics provide support for the Design by Contract style of OO programming: a precondition of a particular method is met if all the PRE blocks associated with that method return true. Otherwise, the precondition is met if all of the parent

Q on function returning

2008-04-12 Thread John M. Dlugosz
In S06, it is explained how the parameter list to 'return' is preserved as a Capture. So, what is the role of the inner and outer return types that are declared on the function?

'returns' vs 'of'

2008-04-12 Thread John M. Dlugosz
I don't like the assignments of 'returns' and 'of'. I think it is easily confused. I've written foo (Int $x) returns Int in examples and nobody noticed. As formal documentation, that scans right as the outer perceived return value type. But no, it's supposed to be foo (Int $x) of Int

Idea: infir types of constants

2008-04-13 Thread John M. Dlugosz
Just surfing, I noticed something about the D programming language: The types of constants need not be specified explicitly as the compiler infers their types http://en.wikipedia.org/wiki/Type_inference from the right-hand sides of assignments. const fact_7 = Factorial!(7); Now in C++,

A TEMP block?

2008-04-13 Thread John M. Dlugosz
S06 Temporization, along with 'temp' variables, defines a TEMP block. Do we really need such a thing? It appears to be a LEAVE block with another level of indirection. Hmm, that is, the body of the TEMP block executes at its normal place at run-time, unlike the episodic blocks it resembles;

Re: Idea: infir types of constants

2008-04-13 Thread John M. Dlugosz
I'm thinking that if strong typing is enabled, mixing untyped and typed things will cause warnings or errors that need not be there. I'm thinking that 'constant' is more special than other variables, and that the formal description of strong typing and static types should say that the

Re: Clarify Design by Contract

2008-04-13 Thread John M. Dlugosz
Moritz Lenz moritz-at-casella.verplant.org |Perl 6| wrote: This is described in depth in Object oriented software construction by Bertrand Meyer. OK, reading about it in Wiki, I see what it's supposed to do. PRE - derived classes may weaken but not strengthen. So if it fails, but the

Help understanding syntax in S06 Pairs as lvalues

2008-04-13 Thread John M. Dlugosz
:(:who($name), :why($reason)) := (why = $because, who = me); What do the symbols $name and $reason refer to? Are they names already in scope? Alternately, the my declarator can also force treatment of its argument as a signature. That would be my (:who($name), :why($reason)) := (why =

the nature of 'temp'

2008-04-13 Thread John M. Dlugosz
Does 'temp' operate on the value or on the container? The text starts, The temp macro temporarily replaces the value of an existing variable... and the description seems consistent with that. temp $*foo = 'foo'; The restore feature is generated by calling VAR($*foo).TEMP, and the method

context vs context

2008-04-13 Thread John M. Dlugosz
The term context is used for two different purposes. I don't like that. The context can refer to list context, item context etc. The context can also refer to the dynamic calling chain, which are Context objects navigated by the context function.

Re: cross operator and empty list

2008-04-14 Thread John M. Dlugosz
Doug McNutt douglist-at-macnauchtan.com |Perl 6| wrote: At 09:58 -0700 4/14/08, Larry Wall wrote: By the way, you don't need to put parens around the arguments to X. It takes a list on either side. We made it tall so that it would stand out visually anyway: $a,$b,$c X $x,$y,$z

Re: Idea: infir types of constants

2008-04-14 Thread John M. Dlugosz
To me the foo looks like a template sub and I wonder how it is instanciated with different types. Since type parameters are provided with [] it should be foo[Int], foo[Str] and the like. I wonder further if that could also be written foo of Str like with Array of Int etc. my foo of Int

Re: Idea: infer types of constants

2008-04-14 Thread John M. Dlugosz
Mark J. Reed markjreed-at-mail.com |Perl 6| wrote: On Mon, Apr 14, 2008 at 2:32 PM, Jonathan Worthington my Dog $fifi .= new(); # works in Rakudo too ;-) And even in Pugs! :) Doesn't help with literals, though, e.g. my Float $approx_pi = 3.14; So the idea of marking the use

static types, checking, conversions

2008-04-14 Thread John M. Dlugosz
I posted my thoughts as a sort of white paper here: http://www.dlugosz.com/files/static-type.pdf This needs to be fleshed out. Decisions need to be made. Anyone want to discuss it with me? --John

shape trait and Hash

2008-04-15 Thread John M. Dlugosz
In S02 it is writ, The key type of a hash may be specified as a shape trait--see S09. However, S09 is rather brief on hashes, and although it shows using a type inside the curlies, it never talks about shape traits or anything else. Am I do understand that it pretty much does all the same

What does this mean in S03?

2008-04-15 Thread John M. Dlugosz
Strings, arrays, lists, sequences, captures, and tree nodes can all be pattern matched by regexes or by signatures more or less interchangably. How can captures me matched by regexes? Does this mean that there is really an isomorphism between Signatures and Regexes?

Chained Comparisons ?

2008-04-16 Thread John M. Dlugosz
I know how comparisons are chained in Perl 6. There is a very short section on it in S03. So, are the operators infix:{''} etc. written in the normal way to take two arguments? Then the language transforms A op B op C into A op B AND B op C on an innate level. Does that apply to any

Re: static types, checking, conversions

2008-04-16 Thread John M. Dlugosz
Thom Boyer thom-at-boyers.org |Perl 6| wrote: Mark J. Reed wrote: It would behoove @Larry to examine the optional type constraints system proposed for Javascript:TNG (see link from firefox.com developers page). I therefore assume that they have done so, but others would benefit by doing

Returning Arrays?

2008-04-16 Thread John M. Dlugosz
How do you declare a function that returns an array? Something like sub foo (blah) is Array of X { ... } seems right, but it has two problems. First is a real problem, and is a mistake seen a lot in C# and the .NET framework. A concrete type is used when it should be an interface. What

Re: static types, checking, conversions

2008-04-16 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: I found two dissertations and a couple of papers about typing JavaScript. The quintessential is that optional typing is defined as having *no* impact on the dynamic behavior of the program. In that respect type annotations are like comments. I

Re: Returning Arrays?

2008-04-16 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: HaloO, John M. Dlugosz wrote: How do you declare a function that returns an array? Something like sub foo (blah) is Array of X { ... } I meant of, not is. In general the of keyword instanciates parametric types just like the direct

Re: Returning Arrays?

2008-04-16 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: HaloO, John M. Dlugosz wrote: I seem to recall seeing sigils in a signature without names, but now I can't remember where. E.g. in S06 und section The want function. Regards, TSa. Somewhere else, I think it discussed unnamed parameters

Re: Chained Comparisons ?

2008-04-16 Thread John M. Dlugosz
Patrick R. Michaud pmichaud-at-pobox.com |Perl 6| wrote: It applies to any operator that has 'chain' associativity -- see S06, Subroutine traits. If I want to make my own chained operator, perhaps the curvy #8828;, #8829;, etc. or make my operator #8807; a synonym for =, how would I tell

Re: Chained Comparisons ?

2008-04-16 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: Well, that's more or less how Icon does it, but we're not going to expose anything like that to the user. If we assume that comparisons take two immutable objects, we can leave it to the compiler to compute the actual value once, and then feed it to

Generic Parameter Proposal

2008-04-16 Thread John M. Dlugosz
First, consider the stated examples for Generic type parameters, from the passage which defines the terminology in S02: sub max (Num ::X @array) { push @array, X.new(); } sub compare (Any ::T $x, T $y) { return $x eqv $y; }

Desk check this code please

2008-04-16 Thread John M. Dlugosz
Is this code syntactically and conceptually correct? method postfix:++ (--::?CLASS) is export { my ::?CLASS $temp = self; self =. successor; return $temp; } method prefix:++ (--::?CLASS) is export is rw { self =.successor; return self; } In particular, are pre/postfix

Does STD.pm handle this?

2008-04-17 Thread John M. Dlugosz
sub GetType (--Type) { ... } my ::RunTimeType := GetType; This is clearly permitted by the prose, that ::x may be bound to any object that does the Abstraction role, such as a typename, package, module, class, role, grammar, or any other protoobject with .HOW hooks. But the syntax might

Re: Chained Comparisons ?

2008-04-17 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: Why the complicated sig? Note that the left sequential definition enforces that ($a + $b) + $c dispatches to a version of + with the return type of the lhs addition. That is you need lots of overloaded versions of listfix +. Nonetheless I would

Re: Returning Arrays?

2008-04-17 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: HaloO, John M. Dlugosz wrote: Variance? Yeah, the standard set of co-, contra-, in- and bivariance ;) Assume A : B being subtypes. Then how should Foo[A] and Foo[B] relate? Foo[A] : Foo[B] # covariance Foo[B] : Foo

Re: Does STD.pm handle this?

2008-04-17 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: I guess not. But ::Newname ::= OldTypeName; should work. The type system is a runtime overlay to the value system. This is reflected in the source by putting types and values into different syntactic slots. You cannot mix these! But

Re: Generic Parameter Proposal

2008-04-17 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: Which is no problem if ::T defines it in the lexical scope. Any outer definition is hidden. I guess re-using ::T in the same scope again for capturing a new type is an error. Just like redeclaring a value variable. BTW is You appear to be saying

use of ::?CLASS

2008-04-18 Thread John M. Dlugosz
OK, what is the proper use of ::?CLASS ? Say in a role you want to take an argument of the same class as the final class, or explicitly declare $self. S12 gives an example: method doit (::?CLASS $self: $a, $b, $c) { ... } but this CONTRADICTS the idea that using the :: sigil in a

Re: use of ::?CLASS

2008-04-18 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: Sorry, I see no contradiction. Method doit *is* a parametric type. That is you need a type argument to make a code type. And then you need args to make an invocation. Now the question is who provides the type argument and when. An explicit

Re: Does STD.pm handle this?

2008-04-18 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: sub foo ($x) {...} $x = foo.new(3); I don't understand your point. Are you thinking of .callwith or postcircumfix( ) methods on the Code object? No, I think of foo not as a Code object but as a class that does Code. Invoking foo means

Re: Context and return types question

2008-04-18 Thread John M. Dlugosz
If a function returns different things if called in list context or item context, how do you define the of type (outer return type) to make the function strongly typed? How about sub foo (-- Seq^Item) {...}? Interesting idea, but that doesn't tell the compiler that the return is keyed to

Re: Context and return types question

2008-04-18 Thread John M. Dlugosz
) to be strongly typed? --John Larry Wall larry-at-wall.org |Perl 6| wrote: On Fri, Apr 18, 2008 at 05:34:25AM -0500, John M. Dlugosz wrote: If a function returns different things if called in list context or item context, how do you define the of type (outer return type) to make the function

Re: S12 delegation (handles trait)

2008-04-18 Thread John M. Dlugosz
Dave Whipp dave-at-whipp.name |Perl 6| wrote: Since the method name (but nothing else) is known at class construction time, the following .wag method is autogenerated for you: method wag (|$args) { $!tail.wag(|$args) } ... Another thing that might be nice (maybe not a perl 6.0.0

method hiding (or not) in derived classes

2008-04-19 Thread John M. Dlugosz
Perl 6 has a concept of a candidate list. The candidate list are those that could handle the call, typically inherited methods and multi variations. It seems that multi variations, at least with respect to the semicolon parameters, compare the actual type and drop out of the list if any

Critisizms on postcircumfix:( )

2008-04-20 Thread John M. Dlugosz
I think the idea of The expected semantics of .() is that of a type coercion... confuses the notion of function call and conversion. If anything other than a Code object has one, it is acting as a functor, or function-like object. The meaning of Dog(args) is seemingly a class method anyway,

progress report

2008-04-20 Thread John M. Dlugosz
I've identified a few more issues while refactoring the text across all the synopses, but I'm just noting everything in my document. Not enough discussion going on to post them all. My main creative effort is in studying type systems, and musing over what it would be like to have Perl 6's

Class names are virtual

2008-04-20 Thread John M. Dlugosz
Larry, you've wanted to have class names used within a class be virtual. With various degrees of conviction across the synopses, you've wanted classes defined within a class to be overridable, or all classes referenced by a class to be overridable, speculating on whether this is do-able.

Re: progress report

2008-04-20 Thread John M. Dlugosz
whiteringmoon-at-gmail.com |Perl 6| wrote: I stumbled onto this group as I was looking for language statisics and I tried understanding what I am looking at. What is Perl? I don't mean to sound stupid in asking this. But could you explain what it is that I am looking at here? WR See

Re: method hiding (or not) in derived classes

2008-04-21 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: Candidate set would be a better term. It is a subset of all long names of a multi in a lexical scope. List, not set, because it is ordered. nextsame/nextwith/etc. are described as invoking the next candidate on the list. Therefore, there is

Re: use of ::?CLASS

2008-04-21 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: You are right and I didn't address this, sorry. Actually the only solution I see is dropping the ::? twigil altogether and specify that CLASS is lexically declared by the compiler. Otherwise we have to make a special case exception out of ::?

Re: Context and return types question

2008-04-21 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: I guess with strong you mean as lossless as possible? I think the type is just :( $: :named$ ) if you want to extract the invocant with a $ prefix. Otherwise it would be :( $, :named$ ) and you extract the item positionally with prefix @ or

Re: Class names are virtual

2008-04-21 Thread John M. Dlugosz
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: Second, I don't like the concept of a virtual method that returns a type. That horribly mixes type level and value level. From the They are mixed! Perl treats types as first-class objects. For functions, types don't need to be treated

Re: Context and return types question

2008-04-21 Thread John M. Dlugosz
Brandon S. Allbery KF8NH allbery-at-ece.cmu.edu |Perl 6| wrote: my ($x, :$named) = foo; # or something like that That looks to me like a form of positional extraction. (Of course, my hit rate on p6 stuff has been remarkably low of late...) It's not just positional, but allows

2 questions on S12

2008-04-22 Thread John M. Dlugosz
Question 1: What is meant by: has $attribute # lexical alias for $!attribute. Here is more concrete example. There is none in S12. class C { has $a; method foo () { my $y = $a; # is the correct? } In that scope, is $a really a shortcut for $self!a ? If

Roles!

2008-04-22 Thread John M. Dlugosz
I finished the first draft of a technical description for compositing roles. It runs to 7 pages. Please see §16 in specdoc. -whew!- --John http://www.dlugosz.com/files/specdoc.odt and .pdf

  1   2   3   4   >