Mar 31st, 2009
by dagfinn.
In part one of this series, we looked at the ability to use lambda functions or closures to process arrays. In this part, we will see how closures can be used to build classes in a completely new way.
After I did my own research, I discovered that someone had beat me to it. As early [...]
Mar 24th, 2009
by dagfinn.
Image via Wikipedia
On the carafe belonging to our coffee maker, there is a barely discernible spot that tells you how far to unscrew the lid in order to open it so that you can pour coffee from it without getting a flood of it in your lap. I never found this spot until it [...]
Mar 19th, 2009
by dagfinn.
You may have heard of the new features that are scheduled for PHP 5.3, but who knows what they can be used for in real programming? I took the time for some experimental research, and came up with a few examples.
At the PHP UK conference, I saw Sebastian Bergmann’s presentation on lambda functions, closures and [...]
Mar 12th, 2009
by dagfinn.
Automobile skeptic: Driving doesn’t always work. I tried it once and crashed into a tree.
Automobile zealot: How did that happen?
Skeptic: I was driving down Hazel Street, reading a magazine. And then suddenly, out of the blue, I hit the tree.
Zealot: But you can’t read magazines while driving a car!
Skeptic: Why not?
Zealot: Because then you’re not [...]