KBD

Keith Devens .com

Friday, July 30, 2010 Flag waving
I would rather be an optimist and be wrong than a pessimist who proves to be right. The former sometimes... – "Hoots"
← Good Will HuntingTest post →

Daily link icon Wednesday, May 29, 2002

Closures!

Wahoo, I just saw Spider-Man again and I'm all over-excited!

Over at Perl.com, Simon Cozens wrote an article about closures, one of the coolest things in programming ever!

Maybe you've heard about closures; they're one of those aspects of Perl -- like object-oriented programming -- that everyone raves about and you can't really see the big deal until you play around with them and then they just click. In this article, we're going to play around with some closures, in the hope that they'll just click for you.

Closures are one of the things that give functions more power. They take away the dangers of dynamic binding. Add lexical variables, and your functions can be self-contained, lean, mean computing machines! Perl has both, read on.


Also from Perl.com, and also by Simon Cozens: Where Wizards Fear To Tread.

So you're a Perl master. You've got XS sorted. You know how the internals work. Hey, there's nothing we can teach you on perl.com that you don't already know. You think? Where Wizards Fear To Tread brings you the information you won't find anywhere else concerning the very top level of Perl hackery.

So, what can we do with all this? The answer is, of course, "anything we want." If you can mess about with the op tree, then you have complete control over Perl's operation. ...But how on earth are we going to get Perl to do something when a test proves false? By messing about with the op tree, of course.

Of course!

Finally, (and all this is from the Perl.com newsletter, also written by Simon Cozens) check this out:

Don't miss next week, when we bring you Larry Wall's next
installment of the Perl 6 design. I've seen the drafts, and
believe me, it's going to blow your mind.

Awesome, can't wait.

← Good Will HuntingTest post →

Comments XML gif


Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

July 2010
SunMonTueWedThuFriSat
 123
45678910
11121314151617
18192021222324
25262728293031



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 2 posts

Recent comments XML

DTerm: A command line anywhere and everywhere

They wrote back. It turns out that,​when I launched it a second time, I​was...

Revence: Jul 26, 2:28am

Minimum Wage Increase Leads to Higher Teen Unemployment Rate - WSJ.com

Sorry, I don't believe it.  My son​was working as a dishwasher, making​$10/...

Bryan Price: Jul 25, 2:50pm

Generated in about 0.123s.

(Used 8 db queries)