Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Apr 2004 01:05:17 -0700
From:      Chris Pressey <cpressey@catseye.mine.nu>
To:        freebsd-chat@freebsd.org
Subject:   Re: Beginning C++ in FreeBSD
Message-ID:  <20040422010517.786b91b8.cpressey@catseye.mine.nu>
In-Reply-To: <opr6uar4fxrcgix0@shawmail>
References:  <200404202124.50967.dgw@liwest.at> <FGEIJLCPFDNMGDOKNBABCEAICKAA.flowers@users.sourceforge.net> <20040421110548.20d8e75c.cpressey@catseye.mine.nu> <opr6uar4fxrcgix0@shawmail>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 21 Apr 2004 22:01:06 -0600
Danny MacMillan <flowers@users.sourceforge.net> wrote:

> On Wed, 21 Apr 2004 11:05:48 -0700, Chris Pressey 
> <cpressey@catseye.mine.nu> wrote:
> 
> > On Tue, 20 Apr 2004 23:28:48 -0600
> > Dan MacMillan <flowers@users.sourceforge.net> wrote:
> >
> >> 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.  :)
> 
> Thirty seconds on babelfish will provide more than enough
> substantiation, and Daniela herself argued my point in one of her
> prior messages.  In crappy, somewhat whimsical pseudocode:
> 
> the_message != 
> translateFrenchToEnglish( translateEnglishToFrench( the_message ) )
> 
> The translations are not reciprocal.  Though I guess that's not a
> specific example.
> 
> Note that only machine translation is relevant for the sake of this 
> argument, because the information available to a human making a 
> translation is basically unbounded and the process is highly
> subjective.

Ah, well then this discussion is kind of pointless, because as you saw
when you visited Babelfish, machines are currently incapable of human
language translation.  :)

That is, if your position is that it is not presently possible to
mechanically translate every expression in one human language with
complete precision in another, I fully agree.

> I do have to confess to some ignorance.  I don't know what your 
> 'Sapir-Worfian' parenthetical alludes to.  At first I thought it was a
> Star Trek reference ... but a quick Google shows that "One of the
> premises of Sapir-Worfian hypothesis implies that semantic systems
> vary without constraint".  Excellent!  I'll just hop on my
> double-jimsen saddle and check the specs on the inline for the rotary
> girder.
> 
> Ah, here we go.  A further Google shows that my ignorance needs no 
> confession, as my reply makes it quite plain.  You've obviously given
> this at least as much thought as I have and studied it besides. 
> <thpthpthpth>

You pretty much summed up the Sapir-Whorf hypothesis (as I understand
it) quite succinctly with "it is not possible to represent every
expression in one human language with complete precision in another."

No, nothing about Star Trek - just a misspelling on my part - although
all these challenges could be regarded as a bit Klingon, I suppose...

A pretty good summary:
http://en.wikipedia.org/wiki/Sapir-Whorf_Hypothesis

> > 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?
> 
> Yes, and I take your point.  But the specific claim that was made was
> that object-oriented languages are optimized differently from 
> non-object-oriented ones.  I just don't see it -- but again, I would
> enjoy an education.

Well, I don't immediately see it either, but on the other hand, I
wouldn't be too surprised.

And I admit I'm taking some liberties with "losing opportunities."  I
suppose, if you put in the effort, you can retain all the information. 
For example, even in the case of translating a partially ordered
language to a fully ordered one, you could implement a partially ordered
evaluator in the fully ordered language, then just link in the original
code.  Of course, it's easy to see how that would be suboptimal, too...

So how's this - say your target language is not a machine language, but
rather C++ itself.  If you're constrained to translating your C++ code
to C, then back to C++ - how much work do you have to put into your
translator to be able to reconstruct C++ code with the same efficiency
as the original source?  Or worse, what if the intermediate language is
not C, but rather, say, Brainf*ck?  Even if it's theoretically possible
(which is my guess, but it's not something I've seen established in any
concrete fashion either way,) the sheer effort involved would be truly
phenomenal.

If I can take Daniela's original point as being that a translator from
X->Z stands a better chance at producing good Z code than a pair of
translators X->Y->Z, then I probably agree.  But beyond that, I really
don't know much except that it's a complex issue.

-Chris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040422010517.786b91b8.cpressey>