Sign In/My Account | View Cart  
advertisement


Listen Print

This Week in Perl 6, April 26 - May 3, 2005
by Matt Fowles | Pages: 1, 2

Perl 6 Language

Anonymous Roles and Closures

Aaron Sherman wondered if he could generate anonymous roles that are also closures. It made my head hurt. People seem to think it's possible though.

Peter Piper picked a hash...

Ingo Blechschmidt wondered what pick would return when called on a hash. Rod Adams suggested that it would return a pair. Larry thought that would be a good idea, if perhaps difficult to implement.

All (Junctions, Bad Subjects, Indecision)

Joshua Gatcomb found that he could use junctions to quickly answer questions but not provide specifics. Sadly, he is not the first person to have this problem. Junctions naturally provide Boolean operations but do not naturally explain what motivated that answer. Perhaps they should be thrown out along with the axiom of choice. After all, do we really need a basis for ALL of our vector spaces?

is rw a No-Op on References?

Ingo Blechschmidt wondered if is rw did anything for references, as you can still modify the value to which they refer. Juerd answered basically yes.

Complex Number Package

Jonathan Lang wondered about creating a complex number package. Including returning junctions of values for roots of unity. Unfortunately these lists can be quite large, even infinite. Thus, he wondered if he could use lazy junctions. Thomas Sandlaß conjectured that he could by the "law of laziness preservation".

Auto-Threading of Junctions and Threads

Aaron Sherman worried that the auto-threading of junction would actually run in separate threads. This is most assuredly not the common case, although some warped soul could implement it that way.

Context of Indices

Autrijus asked what context want would provide when used as an index. Larry provided answers.

Sun's Fortress

Autrijus posted a link to a next-generation computer language from Sun called Fortress and then went on to ask about parameterized types, tuple types, and block labels. Bad Autrijus! Make summarizers lives hard. Then we have to punt like this rather than try to extract the three different threads at once.

Restricting Variable Scopes With while

Joshua Gatcomb wanted to know how he could restrict the scope of variables used in the conditionals of his while statement to the loop. This led to some discussion about the implementation of while as a macro or some other beast. Larry began to ponder the submacro.

FIRST, LAST et al. Support in Pugs

David Christensen decided to try to add support for FIRST, LAST blocks and the like into Pugs. This led him to p6l with some questions about traits which are closures. Answers and suggestions followed.

Junctions of Classes

Ingo Blechschmidt wondered how junctions of classes would act. The consensus seems to be that they act as type specifiers of a sort, restricting whatever the variables they describe can contain.

Subtype Declarations

Luke Palmer wondered what exactly subtype declarations provided and suggested jettisoning them. Larry remained unconvinced.

Labels on Blocks

Stevan Little wondered if there was some way to attach labels to blocks. Discussion ensued, including a comment from Larry that it won't need to be redone.

open and pipe

Gaal Yahas proposed a basic open and pipe built-in for discussion. Discussion followed. Larry mentioned that he has "pretty much" blessed io (from IO::All).

Is if Function?

Juerd wondered if if as a function had unintended consequences. Fortunately, if is not a function, it is a statement-level construct.

Junctions in use Statements

Juerd wondered if he could say use strict & warnings. Larry explained that there were parsing problems with it and possibly limited utility, but he has not officially ruled it out, as the problems have workarounds.

.foo() == one($_.foo(), $?SELF.foo())

This great quandary continues. This week, Larry is leaning towards the .foo() == $_.foo() camp, but nothing is yet set. He also suggested $^ as being equivalent to $?SELF (which I really like). Time will tell how this one will work out. My prediction is that the argument will rage on until Pugs is ready to implement it and needs a definitive answer...then it will change a few more times.

Type System Questions

Autrijus asked a few questions about the type system, and at which times it did what things. Larry provided some answers.

The Usual Footer

Posting via the Google Groups interface does not work. 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