4 ms·
Concrete solutions to Stallman's objection in lexically scoped languages include, - Callable objects that store `FOO`, and - Closures that capture `FOO`. I'm
by repsilat 8y ago
Concrete solutions to Stallman's objection in lexically scoped languages include,
- Callable objects that store `FOO`, and
- Closures that capture `FOO`.
I'm pretty leery of argumentum ad populum. I think we went with lexical scoping for a few clear reasons, and I don't know if the reasons for dynamic scoping are compelling. I would love to hear more of them, though.
- mannykannot 8y agoMy comparison of dynamically scoped variables to globals might be wrong, but, unlike my comment on the way languages have developed, it is not an argumentum ad populum. It has been a while since I worked with dynamically-scoped programs, but I found it harder to reason about how they worked. Maybe it was just because I was less familiar with the technique. It might be that all forms of beyond-local scoping multiply the difficulty in reasoning about programs (especially in the presence of mutable data), and dynamic scoping is a more powerful form of it, increasing the opportunity for setting up difficult-to-follow situations. The issue of ease of understanding is a different one than ease of extending, and I would judge the former to be more important, all else being equal.