Re: proposal: 404 method

2005-06-20 Thread Abhijit Mahabal
Synposis 10... abhijit Abhijit Mahabal http://www.cs.indiana.edu/~amahabal/

Re: proposal: binding with a function

2005-06-20 Thread Abhijit Mahabal
bytes, kilobyte; replace the last line with: &kilobytes := &kilobyte; and the scoping is not an issue. And with synonyms, binding as soon as declaring seems prudent. --abhijit Abhijit Mahabal http://www.cs.indiana.edu/~amahabal/

Re: Ignoring parameters

2005-06-17 Thread Abhijit Mahabal
x27;t topicalize the invocant nowadays? I had thought that they do and one needs the ./ to still talk about the invocant if some inner loop stole the $_, and until such stealing occurs .foo() and ./foo() are the same... --abhijit Damian Abhijit Mahabal http://www.cs.indiana.edu/~amahabal/

Re: ./method

2005-05-15 Thread Abhijit Mahabal
ays $_.method ./method is always $?SELF.method ) Yes, I like it a lot! --abhijit Abhijit Mahabal http://www.cs.indiana.edu/~amahabal/

Re: ./method

2005-05-15 Thread Abhijit Mahabal
ke a topic. This is not better than $o/$O, except that $__ looks more like $_ (but maybe it looks too much like $_, and that alone could invalidate this proposal). Comments? --abhijit Abhijit Mahabal http://www.cs.indiana.edu/~amahabal/

Re: Junctions of classes, roles, etc.

2005-05-02 Thread Abhijit Mahabal
On Mon, 2 May 2005, [ISO-8859-1] Thomas Sandlaß wrote: David Storrs wrote: Tell me what this does: class Tree { method bark() { die "Cannot instantiate a Tree--it is abstract!" } } class Birch { method bark() { return "White, papery" } } class Oak { method bark() { return "Da

Re: Junctions of classes, roles, etc.

2005-04-30 Thread Abhijit Mahabal
On Sat, 30 Apr 2005, Aaron Sherman wrote: On Sat, 2005-04-30 at 22:24 +0800, Autrijus Tang wrote: On Sat, Apr 30, 2005 at 09:13:26AM -0500, Abhijit Mahabal wrote: I do not see how any auto-threading occurs in that code. It is completely innocuous in that sense, and I don't think that is

Re: Junctions of classes, roles, etc.

2005-04-30 Thread Abhijit Mahabal
On Fri, 29 Apr 2005, Brent 'Dax' Royal-Gordon wrote: David Storrs <[EMAIL PROTECTED]> wrote: On Thu, Apr 28, 2005 at 03:28:41PM +0200, Ingo Blechschmidt wrote: so we had junctions of Code references some days ago, what's with junctions of Class and Role objects? :) Could we see some code that shows

Re: Deletion of members by mixin

2005-04-26 Thread Abhijit Mahabal
On Tue, 26 Apr 2005, Aaron Sherman wrote: On Tue, 2005-04-26 at 09:58, Abhijit Mahabal wrote: On Tue, 26 Apr 2005, Aaron Sherman wrote: It also might be useful for roles to be able to delete members and methods from a class like so: role foo { has $.x; has

Re: Roles as anonymous and/or closures

2005-04-26 Thread Abhijit Mahabal
, it seems that the role would need to be the boss on "deleting decisions". Could get pretty confusing! --abhijit Abhijit Mahabal http://www.cs.indiana.edu/~amahabal/

Re: Documentary annotations: $what doc

2005-03-31 Thread Abhijit Mahabal
On Thu, 31 Mar 2005, Luke Palmer wrote: Chip Salzenberg writes: I'd like to annotate Perl 6 parameters and other entities using traits, since that's the best way (I know of) to have them appear immediately in the text of the program where they are. Supposing I had a "doc" trait, could I say: su

Re: compile time signature checking

2005-03-03 Thread Abhijit Mahabal
Another edge case: is it legal to have an optional Pair in the signature? That is: sub foo($x, Pair ?$y, +$z){...} If yes, what does this parse as: foo(10, z => 5); If z => 5 is bound to $y, then $y is almost mandatory. ('almost' because we can still say foo(10); ). (and then can we als

compile time signature checking

2005-03-02 Thread Abhijit Mahabal
I was thinking about how binding of arguments to parameters in a sub/method call would happen. Seems to be a darn tricky thing with all sorts of potential pitfalls! I have a few questions. Consider the following piece of code. Are my expectations correct? sub foo($x, $y, *%slurp) { $x + $y } s

Re: Classes with several, mostly unused, attributes

2004-12-16 Thread Abhijit Mahabal
Larry Wall wrote: On Fri, Dec 10, 2004 at 11:05:32AM -0500, Abhijit Mahabal wrote: : Consider a class (e.g., the hypothetical Geometry::Triangle) that can : have several attributes (side1, side2, side3, angle1, ang_bisector1, : side_bisector, altitude1 and so forth), most of which will not be

Re: Classes with several, mostly unused, attributes

2004-12-15 Thread Abhijit Mahabal
David Storrs wrote: On Dec 15, 2004, at 5:36 PM, Abhijit Mahabal wrote: I think that "slackness-on-demand" is a better policy than "strictness-on-demand", but that, again, is just my opinion Until now, the policy in Perl has always been that it is as slack and forgiving

Re: Classes with several, mostly unused, attributes

2004-12-15 Thread Abhijit Mahabal
David Storrs wrote: Incidentally, I just want to go on record as saying that the verbosity of class declarations in P6 is really starting to skeeve me. I keep reminding myself that these are the edge cases that are being discussed, that you don't need all this stuff for the common case (right?)

Re: Undeclared attributes

2004-12-10 Thread Abhijit Mahabal
Dave Whipp wrote: Attributes are declared with C, but also have a unique signil C<$.>. So is it strictly necessary to declare them? Or rather, is it Cly necessary -- i.e. is the following legal? no strict; class Foo { method bar { say $.a++ } } For the standard layout, I'd think it'd be g

Classes with several, mostly unused, attributes

2004-12-10 Thread Abhijit Mahabal
Consider a class (e.g., the hypothetical Geometry::Triangle) that can have several attributes (side1, side2, side3, angle1, ang_bisector1, side_bisector, altitude1 and so forth), most of which will not be needed for most instances of Geometry::Triangle. I know how this can be done in P5. Using

Is object representation "per class" or "per object"?

2004-12-07 Thread Abhijit Mahabal
cause we'd be saying $current_obj.cast($otherclass), and $otherclass would know it's own layout. Abhijit Mahabal http://www.cs.indiana.edu/~amahabal/

Re: specifying the key Type for a Hash

2004-12-06 Thread Abhijit Mahabal
;t know if it is doable or even desirable, but it sure is cool! Larry --abhijit Abhijit Mahabal http://www.cs.indiana.edu/~amahabal/

Re: specifying the key Type for a Hash

2004-12-03 Thread Abhijit Mahabal
On Fri, 3 Dec 2004, Larry Wall wrote: : None of the synopses have anything like this. S6 talks about the : types of values, but not keys. Oversight, or is this syntax dead? S9 talk about it. Oops. Sorry. So it was oversight after all :) --abhijit Abhijit Mahabal http://www.cs.indiana.edu

specifying the key Type for a Hash

2004-12-03 Thread Abhijit Mahabal
A6 included examples of syntax for specifying the type of the key for a hash: my %pet is Hash(keytype => Str, returns => Cat) None of the synopses have anything like this. S6 talks about the types of values, but not keys. Oversight, or is this syntax dead? --abhijit Abhijit Mahabal

Re: Hyper Here-Docs?

2004-11-30 Thread Abhijit Mahabal
On Wed, 1 Dec 2004, Damian Conway wrote: > Abhijit Mahabal wrote: > > > I am a little confused if the following is valid perl6: > > > > our &xsub = { $x }; > > No. Illegal attempt to assign to a reference. You want aliasing/binding > instead: > >o

Re: Hyper Here-Docs? (was: Re: angle quotes for here-docs ?)

2004-11-30 Thread Abhijit Mahabal
On Tue, 30 Nov 2004, David Christensen wrote: Incidentally, just like mathematically (albeit slightly loosely) an element of a set can be thought of as a function from any singleton, would it be possible for Perl 6 to provide a fast (under the syntactical point of view) way to promote a term to

Re: But is it intuitive?

2004-09-14 Thread Abhijit Mahabal
On Tue, 14 Sep 2004, Austin Hastings wrote: > I was thinking about removing files this morning, and realized that I > wish rm supported inclusion/exclusion. > > In particular, I wanted to remove "* but not Makefile" (since my > Makefile uses lwp-download to re-fetch the source code, etc.) > > It

Roles trying to be nice

2004-08-29 Thread Abhijit Mahabal
e role itself, and if the class has a $.foo, it takes precedence" does not work because $.foo may have been added by another role. Abhijit Mahabal http://www.cs.indiana.edu/~amahabal/

Re: Progressively Overhauling Documentation

2004-08-23 Thread Abhijit Mahabal
On Mon, 23 Aug 2004 [EMAIL PROTECTED] wrote: >>OK, there's one non-incremental idea: documentation that you can write >>in one place and display in some completely different order. (Shades of >>literate programming!) And although there are good reasons for keeping >>the docs in the same file as