8
$\begingroup$

Lexical closures are an implementation technique in languages with first-class functions.

I'm interested in a simple operational description of function closures. Does anyone know of such a description?

$\endgroup$
5
  • 5
    $\begingroup$ Uhm, ask your advisor, the inventor of SOS? $\endgroup$ Sep 7 '11 at 22:02
  • 1
    $\begingroup$ You are relentless. $\endgroup$ Sep 7 '11 at 22:36
  • 1
    $\begingroup$ Is there any specific difficulty that prevents you from writing down a small-step SOS yourself? $\endgroup$ Sep 8 '11 at 10:40
  • $\begingroup$ I know what you're up to! $\endgroup$ Mar 8 '12 at 7:31
  • $\begingroup$ I hope so, although this question is unrelated to that. $\endgroup$ Mar 19 '12 at 12:14
5
$\begingroup$

Is chapter 29 of Bob Harper's book what you are looking for?

$\endgroup$
3
  • $\begingroup$ No. This is the standard CK-machine style semantics I'm familiar with. From PL-implementation lore, I know that having lexical closures is standard practice. I was wondering whether there is a semantic account which highlights them formally. $\endgroup$ Sep 10 '11 at 21:13
  • $\begingroup$ Maybe you could edit your title & question to clarify what you are looking for? $\endgroup$ Sep 12 '11 at 15:57
  • 2
    $\begingroup$ No, he should write his thesis and talk to his advisor. Or make his advisor use StackExchange. $\endgroup$ Sep 13 '11 at 6:54
4
$\begingroup$

Closures form an important concept that I try to teach in my undergraduate Programming Languages class. You can find my lecture notes online.

The Handout 8 shows big step semantics using environments and closures. The Handout 9 shows my flavour of the SECD machine. (The latter didn't work all that well for teaching purposes because the students got lost in detail and didn't develop good intuitions. So I switched to big-step semantics.)

Neither of these is what you are asking for, but perhaps they could form a starting point?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.