3 ms·
My 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
by mannykannot 8y ago
My 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.