This Week in Perl 6, July 20-26, 2005
by Matt Fowles
|
Pages: 1, 2, 3
Perl 6 Language
User-Defined Context Behavior
Ingo Blechschmidt wanted to know how to make his own custom class that would
act specially in list context. Thomas Sandlaß suggested overloading
&infix:<=>. Sadly, his answer doesn't seem to have made it to
Google Groups.
Hash Creation with Duplicate Keys
Ingo Blechschmidt noticed that in Perl 5 hash definitions, the rightmost duplicate wins, whereas the leftmost wins in Perl 6. He wondered if this was a bug or not. Luke explained that it was that way for named variable bindings. Larry figured it should be that way only for named variable binding. If Pugs has not done it yet, some brave soul could probably add tests and find it implemented before they had finished committing.
Tail Calls, Methods, and Currying
Brent "Dax" Royal-Gordon wondered about tail calls, noting that the current
method ($obj.can('meth').goto($obj, *@args);) is kinda ugly. Larry
mused that return g() should go ahead and tail call. If the code
does not want a tailcall there, then it should avoid it manually.
Pairs and Binding Play Poorly Together
Autrijus noted that pairs and bindings (such as in a for loop)
play badly together. Larry supposed that the Bare code object
could have parameters of type Pair|Item (note no
Junction) by default to solve this problem. Damian supported the
exclusion of Junction.
Method
Introspection and Meta meta.classes
Chromatic wondered about subroutine and method introspection. Sam Vilain thought he might want to look at Stevan Little's Perl 6 MetaModel. He also talked about closing the loop on meta-meta-meta headaches. Apparently Smalltalk has done this somewhere.
Big Object Rethink
Larry posted a fairly major rethink of member variables and methods. Honestly I did not quite follow what he described, and there is a lot to summarize--Hey! Look over there! ::PUNT:: Nothing to see here, move along.
Garbage Collection API
David Formosa (after being lightly chastized by an unknown summarizer) started a new thread expanding on his desire for a GC API. I thought there were replies to this, but they don't seem to have made it to Google.
Exposing the GC
Piers Cawley thought that it might be useful to expose the GC to get an array of all objects of a particular class. Brent "Dax" Royal-Gordon thought that the ability to get such an array would be useful, but that it should merely be an implementation detail of whether an array of weak refs or the GC or Harry Potter was invoked.
The Usual Footer
To post to any of these mailing lists, please subscribe by sending email to
perl6-internals-subscribe@perl.org,
perl6-language-subscribe@perl.org, or
perl6-compiler-subscribe@perl.org. If you find these summaries
useful or enjoyable, please consider contributing to the Perl Foundation to
help support the development of Perl. You might also like to send feedback to
|
Related Reading Perl Testing: A Developer's Notebook |


