This Week in Perl 6, through August 2, 2005
by Piers Cawley
|
Pages: 1, 2, 3
&say's
Return Value
Gaal Yahas thought that &print and &say
should fail on errors and return the printed string on success
(but true). Larry thought not. It looks like they'll end up returning a
Boolean or throwing an exception.
$arrayref.ref
Ingo continues his ongoing task of getting clarification of the semantics of a whole host of things. This time he wanted to know about the behavior of references. Larry clarified.
Binding Scalars to Aggregates
Next up in Ingo's clarification project was binding scalars to aggregates. (Or did he mean binding aggregates to scalars?) Again, Larry came through with answers. It turns out that there's more to this than meets the eye at first glance. Autrijus's post on containers over in perl6-compiler addresses some of these issues, as well.
Binding Hashes to Arrays?
Ingo asks, "Is it legal to bind a hash to an array, or vice versa?"
Larry answers, "Not at the moment."
Module Init Hooks and Pragmas
Gaal Yahas wondered what function in a module to call when you
use or no it.
Warnock applies.
Eliminating
&{} and *{}
Autrijus wondered if we really need the & sigil. Warnock
applies.
Stringification of Pairs
For some reason, Ingo's shortest question ("How do pairs stringify?")
attracted the largest response. Well, at first blush it looks like it did.
What actually happened was that Warnock claimed it, but the
References: header in Andrew Shitov's posed discussed below was a
little broken.
zip
with ()
Some strange behavior of zip caught out Andrew Shitov. Ingo
explained the problem. There was quite a bit of discussion of the various
subtleties exposed.
Sometimes I pity the poor swine who's going to have to write Programming Perl 6. It's going to make the current camel look like a slim volume, if we're not careful.
Mutating
map and grep
Ingo Blechschmidt wondered if it was true that Perl 6's grep,
map, etc., wouldn't allow mutating values in their source array. He
wondered if it would be possible to use a pragma to get the old, Perl-5-ish,
behavior back. Thomas Sandlaß wondered if simply explicitly declaring
the given block's argument as rw wouldn't do the job. There is no
word from @Larry yet.
Acknowledgements, Adverts, Apologies, Alliteration, and Conference Envy
Damn. Couldn't think of a word beginning with "a" that means "conference." [Editor's note: attendance?] To all you lucky people in Portland at OSCON, I wish I was there and am a seething mass of envy. Well, not that seething: I'm consoling myself by going to the WorldCon in Glasgow, instead.
Help Chip
geeksunite.org: tell all your friends; this cannot stand.
The Usual Footer
If you find these summaries useful or enjoyable, please consider contributing to the Perl Foundation to help support the development of Perl.
Or, you can check out my website, now running on a new engine. There are also vaguely pretty photos by me.
|
Related Reading Perl Testing: A Developer's Notebook |


