Hacker News new | ask | show | jobs
by KazimirMajorinc 6003 days ago
Closures are the functions with "private" data preserving values between two calls of the same function. It is not impossible with dynamic scope - but problem is again accidental name clash. As it is the same problem as with macros - I guess it can be solved on similar way - using functions with generated unusual and unique names of variables.

On the other side, with dynamic scope, functions are as expressive (or almost) as macros and they are the first class values. For example, one can implement "if" as a function. http://kazimirmajorinc.blogspot.com/2009/01/two-definitions-...