Re: DBI v2 - The Plan and How You Can Help

2005-07-11 Thread Darren Duncan
I have an additional reply to the following ... At 10:25 PM +1000 7/9/05, Adam Kennedy wrote: In any case, I still propose that DBI2 split the driver interface into Roles. The main DBI2::Role::Transport role does ONLY what DBI does best now. That is, connecting to the database, preparing and

Re: method calls on $self

2005-07-11 Thread Michele Dondi
On Sat, 9 Jul 2005, Robin Redeker wrote: I wasn't thinking 'cool', I was thinking 'visually distinctive and mnemonic'. I actually think o. is cooler. Yes, i would like o. more too. At least it doesn't introduce a completly meaningless '/' preceded by a '.'. Hmmm... I am one of those who

Re: DBI v2 - The Details - :name for placeholders

2005-07-11 Thread Jonathan Leffler
On 7/9/05, Darren Duncan [EMAIL PROTECTED] wrote: At 1:03 AM -0700 7/9/05, Jonathan Leffler wrote: Can you explain which parts of the SQL:2003 mandate this notation? I've had a moderately good poke around my copy of ISO/IEC 9075-2:2003 (SQL/Foundation) and cannot find this. I'd like a few

Re: DBI v2 - The Plan and How You Can Help

2005-07-11 Thread Jared Still
driver://user:[EMAIL PROTECTED]:port/instance I haven't been following this too closely, so my apologies if already mentioned. This connect string is very much like the new Easy Connect Naming method in Oracle 10g. eg. sqlplus scott/[EMAIL PROTECTED]:port/service Note that it is not

Re: DBI v2 - The Plan and How You Can Help

2005-07-11 Thread Adam Kennedy
No - you don't seem to understand. The challenge-response protocol can ask someone for the RSA key fob number this time, their mother's maiden name the next time, their employee number the time after that, and nothing on the fourth occasion. You cannot predict what the extra information

Re: Quick OO .isa question

2005-07-11 Thread Stevan Little
Ingo, On Jul 11, 2005, at 9:16 AM, Ingo Blechschmidt wrote: Hi, class Foo {} class Bar is Foo {} Bar.new.isa(Object);# true Bar.new.isa(Class); # false Bar.new.isa(Foo); # true Bar.new.isa(Bar); # true # These are clear, I think. Yes, these all make sense

Re: Perl6 burns 18% fewer calories

2005-07-11 Thread Michael Hendricks
Adam Kennedy wrote: My god! What is this wonderful module of which you speak? Text::TypingEffort is available on CPAN. Finally a chance to help in the argument that ideas that try to force less characters in a huffman-inspired nightmare might make life worse from a actually typing it in

Re: Quick OO .isa question

2005-07-11 Thread Ingo Blechschmidt
Hi, Stevan Little wrote: On Jul 11, 2005, at 9:16 AM, Ingo Blechschmidt wrote: Bar.isa(Object);# true Bar.isa(Class); # true Bar.isa(Foo); # ? (my guess: false) Bar.isa(Bar); # ? (my guess: false) I am not sure about this. I think that .isa as a

Re: How do I... create a value type?

2005-07-11 Thread Luke Palmer
On 7/11/05, Ingo Blechschmidt [EMAIL PROTECTED] wrote: Hi, my $x = 42; my $y = $x; $y++; say $x; # Still 42, of course class Foo { has $.data; method incr () { $.data++ } # Please fill in appropriate magic here } I think it's just `class Foo is

Re: How do I... create a value type?

2005-07-11 Thread Luke Palmer
On 7/11/05, Ingo Blechschmidt [EMAIL PROTECTED] wrote: class Foo { has $.data; method incr () { $.data++ } # Please fill in appropriate magic here } my Foo $x .= new(:data(42)); my Foo $y = $x; $y.incr(); say $x.data;# Should still be 42 say $x =:= $y;

Re: Quick OO .isa question

2005-07-11 Thread Stevan Little
Ingo, On Jul 11, 2005, at 12:30 PM, Ingo Blechschmidt wrote: I am not sure about this. I think that .isa as a class method should behave much as it does for an instance method. If we start supporting things like Bar.isa(Class) then we start exposing the soft underbelly of the meta-model to the

Re: Quick OO .isa question

2005-07-11 Thread Larry Wall
On Mon, Jul 11, 2005 at 09:46:30AM -0400, Stevan Little wrote: : Ingo, : : On Jul 11, 2005, at 9:16 AM, Ingo Blechschmidt wrote: : Hi, : : class Foo {} : class Bar is Foo {} : : Bar.new.isa(Object);# true : Bar.new.isa(Class); # false : Bar.new.isa(Foo); # true :

Re: Quick OO .isa question

2005-07-11 Thread Ingo Blechschmidt
Hi, Stevan Little wrote: Actually I was thinking that MyClass.isa(...) would work much as it did in Perl 5 (like an instance). But that access to the underlying MyClass class instance would not be as simple. Something like ::MyClass would provide access to the Class instance. class Foo

Re: Quick OO .isa question

2005-07-11 Thread Ingo Blechschmidt
Hi, Larry Wall wrote: On Mon, Jul 11, 2005 at 09:46:30AM -0400, Stevan Little wrote: : On Jul 11, 2005, at 9:16 AM, Ingo Blechschmidt wrote: : Bar.isa(Object);# true : Bar.isa(Class); # true : Bar.isa(Foo); # ? (my guess: false) : Bar.isa(Bar); #

Re: How do I... create a value type?

2005-07-11 Thread Larry Wall
On Mon, Jul 11, 2005 at 11:48:09AM -0600, Luke Palmer wrote: : Then you don't need any special magic. But if you want to have : mutator methods that aren't in .= form (which I recommend against for : value types), maybe the `is value` trait makes the class do the : `value` role, which gives you a

Re: method calls on $self

2005-07-11 Thread Larry Wall
On Mon, Jul 11, 2005 at 11:14:18AM +0200, Michele Dondi wrote: : Hmmm... I am one of those who likes ./ more, instead. I mean, I _really_ : like it! Thus, how about making '/' less meaningless, i.e. more : meaningful, in more general situations?!? Um, do you have a specific proposal? Like

Re: Quick OO .isa question

2005-07-11 Thread chromatic
On Mon, 2005-07-11 at 15:16 +0200, Ingo Blechschmidt wrote: Bar.new.isa(Object);# true Bar.new.isa(Class); # false Bar.new.isa(Foo); # true Bar.new.isa(Bar); # true I'd like to go on a tangent to suggest that anyone who uses .isa() in actual real code ought to be

Re: Quick OO .isa question

2005-07-11 Thread Larry Wall
Though, arguably, if one is a true Platonist, one should view roles as Aristotelian, and base classes as Platonic and therefore more real...but I'm more of an Aristotelian myself, so I tend to think of the Platonic ideals as less real than reality. Whatever. Both Plato and Aristotle would

Re: method calls on $self

2005-07-11 Thread Matt Fowles
Larry~ On 7/11/05, Larry Wall [EMAIL PROTECTED] wrote: On Mon, Jul 11, 2005 at 11:14:18AM +0200, Michele Dondi wrote: : Hmmm... I am one of those who likes ./ more, instead. I mean, I _really_ : like it! Thus, how about making '/' less meaningless, i.e. more : meaningful, in more general

Re: Quick OO .isa question

2005-07-11 Thread Stevan Little
On Jul 11, 2005, at 3:07 PM, Larry Wall wrote: Bar.meta.does(CLASS)# true To me this is just code-reuse on the meta-level. Much like in smalltalk: MetaClass isa ClassDescription isa Behavior isa Object and: Class isa

Re: Quick OO .isa question

2005-07-11 Thread Stevan Little
chromatic, On Jul 11, 2005, at 4:26 PM, chromatic wrote: On Mon, 2005-07-11 at 15:16 +0200, Ingo Blechschmidt wrote: Bar.new.isa(Object);# true Bar.new.isa(Class); # false Bar.new.isa(Foo); # true Bar.new.isa(Bar); # true I'd like to go on a tangent to suggest

More on Roles, .does(), and .isa() (was Re: Quick OO .isa question)

2005-07-11 Thread chromatic
On Mon, 2005-07-11 at 17:47 -0400, Stevan Little wrote: I actually agree with you on that. But I would like to clarify it to say that: Foo.isa(Bar) # Foo.meta.isa(Bar) || Foo.meta.does(Bar) ... meaning that the .isa() which is supposed to be aliased into the class from .meta is

Re: DBI v2 - The Plan and How You Can Help

2005-07-11 Thread Michael Peppler
On Sat, 2005-07-09 at 12:42 +0200, Jochen Wiedmann wrote: Jonathan Leffler wrote: I dunno which DBMS support prepare without a database connection, but I would expect all the mainstream databases to require a database connection. +1 I'm also far from convinced that there's any

Re: Quick OO .isa question

2005-07-11 Thread Larry Wall
On Mon, Jul 11, 2005 at 05:35:41PM -0400, Stevan Little wrote: : So going away from philosophy 101 here, and back to CS, it could be : said that a Class has-a MetaClass (although not in the strict : user-level-OO sense of the word). Yes, though I think of it more as delegation. Of course,

Re: method calls on $self

2005-07-11 Thread Larry Wall
On Mon, Jul 11, 2005 at 04:50:56PM -0400, Matt Fowles wrote: : Yay! I guess I will take this moment to resuggest @^ as a list of : invocants and $^ =:= @^[0]. I like how the ^ kinda points you the : right way, also visually distinctive and doesn't get in the way of : $_... I don't see much use

How to write a self.pm (Re: method calls on $self)

2005-07-11 Thread Autrijus Tang
(Cross-posting the new ruling from p6l to p6c to discuss implementation strategy) On Mon, Jul 11, 2005 at 06:29:28PM -0700, Larry Wall wrote: { let $Larry.decisive = 1; Okay, this is what we're gonna do. We're gonna go back pretty close to where we were originally, but with a

Re: DBI v2 - The Plan and How You Can Help

2005-07-11 Thread Darren Duncan
At 6:30 PM -0700 7/11/05, Dean Arnold wrote: RE: SQL Parse Trees (or other non-SQL query input) Since none of (ODBC, JDBC, ADO.NET) seems compelled to impose this concept on driver writers, I don't see why DBI should be the vanguard. I should emphasize that I never expected to be able to send

Re: MML dispatch

2005-07-11 Thread Damian Conway
Yuval asked me off-list if I would comment on the various dispatch algorithms that have been proposed. I guess I have used MMD more than most people in this discussion. Indeed, having both written Class::Multimethods and supervised a PhD that involved adding MMD to C++, one might have assumed

Re: How to write a self.pm (Re: method calls on $self)

2005-07-11 Thread Larry Wall
On Tue, Jul 12, 2005 at 10:17:01AM +0800, Autrijus Tang wrote: : On Mon, Jul 11, 2005 at 06:29:28PM -0700, Larry Wall wrote: : The obvious thought is to have yet another magical, $^H like flag, to : denote the current dialect. If it is set, then the parser can emit : .method as $_.method, instead

Re: DBI v2 - The Plan and How You Can Help

2005-07-11 Thread Sam Vilain
Darren Duncan wrote: I should emphasize that I never expected to be able to send any type of ASTs over the pipe to the database. They would still be interpreted by the database driver for Perl and/or a wrapper thereon, into the database native format. Its just that, to an application, it

Re: How to write a self.pm (Re: method calls on $self)

2005-07-11 Thread Autrijus Tang
On Mon, Jul 11, 2005 at 09:04:54PM -0700, Larry Wall wrote: On Tue, Jul 12, 2005 at 10:17:01AM +0800, Autrijus Tang wrote: : On Mon, Jul 11, 2005 at 06:29:28PM -0700, Larry Wall wrote: : The obvious thought is to have yet another magical, $^H like flag, to : denote the current dialect. If it