By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,120 Members | 1,257 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,120 IT Pros & Developers. It's quick & easy.

difference in the following terms with examples. (regarding scope and binding)

P: n/a
hello,
i want to know the proper meanings and usage of the following .
a>. dynamic scoping (an online link will be extremely helpful . and what
is lexical scoping or static scoping ??

b>. binding in general and then , dynamic binding and static binding.

Thanking all those who might answer this.....Thanks once more.
Jul 24 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
maadhuu wrote:
hello,
i want to know the proper meanings and usage of the following .
a>. dynamic scoping (an online link will be extremely helpful . and what
is lexical scoping or static scoping ??

b>. binding in general and then , dynamic binding and static binding.

Thanking all those who might answer this.....Thanks once more.


Looks like homework. I seem to recall similar questions 20 years ago in
my language syntax classes.
Jul 24 '05 #2

P: n/a
definitely not Homework......atleast someone tell me what dynamic scoping
is and how it is implemented.

Jul 25 '05 #3

P: n/a
* maadhuu:
definitely not Homework......atleast someone tell me what dynamic scoping
is and how it is implemented.


You don't have that in straight C++.

See <url:
http://en.wikipedia.org/wiki/Scope_%28programming%29#Static_versus_dynamic_scop ing>,
but skimming that explanation I found it hard to follow (even though I know
something about the subject matter), so perhaps pick up a good Lisp or
Scheme book?

Most Lisp books I've seen explain dynamic scoping more clearly than
Wikipedia currently does.

Short of it: when a function refers to an identifier A the reference is
bound to some variable or something depending on where in the call chain an
A was most recently defined, and the call chain is a runtime thing.

Dynamic scoping is of interest in C++ when functional-style programming is
added e.g. in the form of libraries like <url:
http://spirit.sourceforge.net/distrib/spirit_1_7_0/libs/spirit/phoenix/index.html>.
However I don't know whether Phoenix supports dynamic scoping.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Jul 25 '05 #4

P: n/a
thanks for the help.

Jul 25 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.