Re: Database Transactions and STM [was: Re: STM semantics, the Transactional role]

2005-07-20 Thread Yuval Kogman
On Mon, Jul 18, 2005 at 15:16:16 +1200, Sam Vilain wrote: Yuval Kogman wrote: everyone gets to choose, and another thing I have in mind is the Transactional role... DBI::Handle does Transactional; To the STM rollbacker and type checker thingy this means that any IO performed by

Re: Type::Class::Haskell does Role

2005-07-20 Thread Yuval Kogman
On Sun, Jul 17, 2005 at 18:23:02 +, Luke Palmer wrote: * Coercion of parameters and a class's willingness to coerce into something is a better metric of distance Well, if you think metrics at all are a good way to do dispatch. Well, we do have a notion of closeness

Hash creation with duplicate keys

2005-07-20 Thread Ingo Blechschmidt
Hi, # Perl 5 my %hash = (a = 1, b = 2, a = 3); warn $hash{a}; # 3 But I vaguely remember having seen...: # Perl 6 my %hash = (a = 1, b = 2, a = 3); say %hasha;# 1 Can somebody confirm this? --Ingo -- Linux, the choice of a GNU | Mathematicians practice

User-defined behaviour of hashes in list context

2005-07-20 Thread Ingo Blechschmidt
Hi, according to Damian [1]...: my %hash = (a = 1, b = 2); my @array = %hash; say @array[0].isa(Pair); # true How can I override this behaviour? class MyHash is Hash { # Please fill in here } my %hash is MyHash = (a = 1, b = 2); my @array =

Re: User-defined behaviour of hashes in list context

2005-07-20 Thread TSa (Thomas Sandlaß)
HaloO Ingo, you wrote: according to Damian [1]...: my %hash = (a = 1, b = 2); my @array = %hash; say @array[0].isa(Pair); # true How can I override this behaviour? class MyHash is Hash { # Please fill in here # my idea is to overload *infix:=

Re: Referring to package variables in the default namespace in p6

2005-07-20 Thread Matthew Hodgson
On Wed, 20 Jul 2005, TSa (Thomas Sandlaß) wrote: Matthew Hodgson wrote: I'm very surprised that package variables end up in OUR::, however - because surely they're not necessarily lexically scoped - and the whole point of 'our' was lexical global scoping, right? :/ Sorry, what is 'lexical

Re: Do I need has $.foo; for accessor-only virtual attributes?

2005-07-20 Thread Piers Cawley
Sam Vilain [EMAIL PROTECTED] writes: Larry Wall wrote: Users of the class includes people subclassing the class, so to them they need to be able to use $.month_0 and $.month, even though there is no has $.month_0 declared in the Class implementation, only has $.month. We thought

This week's summary

2005-07-20 Thread The Perl 6 Summarizer
The Perl 6 Summary for the week ending 2005-07-19 Welcome to another Perl 6 Summary, brought to you by the words 'displacement' and 'activity'. So far today I've caught up with everything unread in NetNewsWire, my Flickr groups, every other mailing list I'm subscribed to and

Tail method calls, can(), and pre-currying

2005-07-20 Thread Brent 'Dax' Royal-Gordon
brentdax Is there a Perl 6 tail call syntax, and if so is it implemented in Pugs? autrijus sub.goto(...); autrijus and yes. brentdax Oh...are tail method calls possible? autrijus tail method calls. hrmph. I have a few methods where I'd like to perform tail calls into another object's methods. If

Subroutine and Method Introspection

2005-07-20 Thread chromatic
A12 and S12 describe introspection on objects and classes. The metaclass instance has the method getmethods() which returns method descriptors. The design specifies several traits queryable through these descriptors. Methods (and subroutines) can take other traits, such as is lvalue or even

Re: Do I need has $.foo; for accessor-only virtual attributes?

2005-07-20 Thread Sam Vilain
Piers Cawley wrote: Users of the class includes people subclassing the class, so to them they need to be able to use $.month_0 and $.month, even though there is no has $.month_0 declared in the Class implementation, only has $.month. We thought about defining the attribute variables