Beginning C++ in FreeBSD

Chris Pressey cpressey at catseye.mine.nu
Wed Apr 21 11:07:37 PDT 2004


[let's move this to -chat out of consideration for the individuals who
are more concerned with asking/answering questions about FreeBSD]

On Tue, 20 Apr 2004 23:28:48 -0600
Dan MacMillan <flowers at users.sourceforge.net> wrote:

> > > > From: Daniela
> > > > Sent: April 17, 2004 04:50
> > > >
> > > > OO languages can be optimized differently than non-OO languages,
> > > > and when you translate one language into another, this advantage
> > > > gets lost.
> > >
> > > I challenge you to defend this claim with a specific example.
> >
> > I don't really have a specific example, but it's quite the same with
> > human languages. The more often a text is translated, the more
> > useless information
> > gets added to it. And if the original text is beautifully written,
> > it is often total crap when you translate it back.
> 
> These are not analagous.  The reason things get lost in the
> translation of human language is that it is not possible to represent
> every expression in one human language with complete precision in
> another.

I challenge you to defend this (Sapir-Worfian) claim with a specific
example.  :)

> However, it =is= possible to represent object orientation
> with complete precision in a procedural language.  To support object
> orientation, C++ adds to C an intrinsic this pointer and vtables. 
> These concepts can be expressed explicitly in C without loss of
> fidelity.

That (the Turing-Church thesis) is not at issue.  What is at issue is
opportunities for optimization.

I can't say for "Object Orientation" specifically (since there are as
many definitions of an "OO language" as there are "OO languages",) but
in general, translation between languages *can* result in a loss of
opportunities for optimization.

For example, if you translate a program from a language with
partially-specified evaluation order to one with strict &
fully-specified evaluation order, do you not lose the opportunity to
optimize it by reordering evaluations?

-Chris


More information about the freebsd-chat mailing list