[Perl] Today's Perl Lecture

Shlomo Yona shlomo at cs.haifa.ac.il
Tue Nov 12 00:57:42 PST 2002


Hello,

Today's Perl lecture is about "Closures and Functional Programming"

I'll try to explain what Closures are, and what they are good for,
and I'll use this while explaining about Lambda Calculus.

Lambda Calculus is a powerful computational model (equivalent to Turing Machines)
which can be used easily as it's represented as a very simple subset of Perl.

The Lambda Calculus is an excuse to see some functional programming.

We will see some functional programming techniques in Perl. it's about how to write functions that can modify and manufacture other functions.

Why would you want to do that? Because that way your code is more flexible and more reusable. Instead of writing ten similar functions, you write a general pattern or framework that can generate the functions you want; then you generate just the functions you need according to the pattern. The program doesn't need to know in advance which functions are necessary; it can generate them as needed. Instead of writing the complete program yourself, you get the computer to write it for you. 

I would like people who intend to arrive today to send me a short reply, so I can have some idea how many people are comming today.

Thanks.

Hope to see you all this evening (as usual, at 18:00).

Details:  http://cs.haifa.ac.il/~shlomo/perl/

-- 
Shlomo Yona
shlomo at cs.haifa.ac.il
http://cs.haifa.ac.il/~shlomo/






More information about the Perl mailing list