Skip to content
dann toliver edited this page Feb 27, 2014 · 3 revisions

Scope

In K.E. Iverson's paper I found that J language used to be dynamically scoped

Following an idea that Larry Breed picked up at a lecture by the late Professor A. Perlis of Yale, we adopted a scheme of dynamic localization in which names localized in a function were known to further functions invoked within it.

This decision made it possible to pass any number of parameters to subordinate functions, and therefore circumvented the limitation of at most two explicit arguments, but it did lead to a sometimes confusing profusion of names localized at various levels. The introduction of atomic representation (box and enclose) has made it convenient to pass any number of parameters as explicit arguments; in J this has been exploited to allow a return to a simpler localization scheme in which any name is either strictly local or strictly global.

  • tricky third paragraph ("An environment is a sequence of frames"): plain english interpretation?
  • Figure 3.1 is confusing: three environments, each with a single frame instead of a sequence of frames?
  • also, they never distinguish between "enclosing environment" as the frame holder vs next env up
  • also, why not explicitly put the envs in the diagram?
  • also, why not show a sequence of frames?
  • also, this is horrible.

[we realized after some conversation that the "environments" don't have an actual existence in the environment, and should probably be big ovals surrounding multiple frames or something. I managed to infect everyone with my confusion and it took a jolly long time before we sorted it all out again.]

Clone this wiki locally