do any one know why scripitng languages use dynamic scope rule ? I can not find any thing about this matter on the Internet.
Scripting languages generally do not have dynamic scoping. Scheme, Lua, Ruby, and Python are all lexically scoped. Only a few languages still around use dynamic scope because it makes it painfully hard to reason about what your code is doing by looking at it.
When you say "dynamic scoping" what are you trying to describe?
Partly because they can. Scripting languages already have substantial overhead to access variables compared to compiled languages. Adding dynamic scoping is easy, as is adding fun features like closures.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With