Re: A Change In Terminology: Monomorphic Objects. Polymorphic Objects
Greg Herlihy wrote:
Le Chaud Lapin wrote:
You are describing a "declarative" programming language.
I don't think so Greg. After all, I showed both styles, using the
exact same language, C++.
Some people use the former. Some of us use the latter. As far as
things happening in sequence, they still do in C++. I guess I can
vaguely see what you mean, if for instance, the compiler calls the
constructor which you wanted it to do by declaring that it should be
called via the instantiation of a class.
The point I was making though, is not really imperative versus
declarative. I *do* believe in the imperative. [Old Prolog sessions
come to mind.]
What I am saying is that, in one case, there is a focus on process. In
the other, there is a focus on state _and_ process, but state is more
important. Note that "state" is actually the word "form" in disguise.
Another way to illustrate the point that I am trying to make is, "Why
spend time getting what you already have?"
Here is an example of the "get" mentality:
Hasher *phasher = GetHasher();
phasher->hash(....);
delete phasher;
Here is an example of the "I do not need to get what I already have"
mentality:
Hasher hasher;
-Le Chaud Lapin-
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]