Dynamic or static scoping in C++ and Smalltalk

S

SPECTACULAR

Hi all.
I have a question here.. what kind of scoping does C++ use?
and what kind does Smalltalk use?

I know smalltalk is a little bit old .. but any help would be
appreciated.
 
R

Ron Natalie

SPECTACULAR said:
Hi all.
I have a question here.. what kind of scoping does C++ use?
and what kind does Smalltalk use?

I know smalltalk is a little bit old .. but any help would be
appreciated.
I have no clue as to what smalltalk does, I don't even know if smalltalk
uses the word "scope" in the same meaning as C++.

C++ always has static scoping. Scoping refers to the context of the
variable naming. It only has meaning at compile time.

C++ does have dynamic typing (or binding) at certain times. What
differs C++ from many other (more pure) Object Oriented languages
is that C++ inherently is STATIC typed/bound. You have to specifically
turn it on by declaring virtual functions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top