From owner-freebsd-chat@FreeBSD.ORG Wed Apr 21 21:01:38 2004 Return-Path: Delivered-To: freebsd-chat@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A8A716A4CE for ; Wed, 21 Apr 2004 21:01:38 -0700 (PDT) Received: from pd3mo3so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id F3CA643D5C for ; Wed, 21 Apr 2004 21:01:37 -0700 (PDT) (envelope-from flowers@users.sourceforge.net) Received: from pd3mr1so.prod.shaw.ca (pd3mr1so-ser.prod.shaw.ca [10.0.141.177])2003)) with ESMTP id <0HWK00HOT0HYX1@l-daemon> for freebsd-chat@freebsd.org; Wed, 21 Apr 2004 22:01:10 -0600 (MDT) Received: from pn2ml9so.prod.shaw.ca ([10.0.121.7]) by pd3mr1so.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0HWK002SW0HMQ2A0@pd3mr1so.prod.shaw.ca> for freebsd-chat@freebsd.org; Wed, 21 Apr 2004 22:00:58 -0600 (MDT) Received: from sirius (S0106004001438e5b.cg.shawcable.net [68.144.47.89]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with ESMTP id <0HWK00I1F0HWL8@l-daemon> for freebsd-chat@freebsd.org; Wed, 21 Apr 2004 22:01:09 -0600 (MDT) Date: Wed, 21 Apr 2004 22:01:06 -0600 From: Danny MacMillan In-reply-to: <20040421110548.20d8e75c.cpressey@catseye.mine.nu> To: Chris Pressey Message-id: MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-15; format=flowed Content-transfer-encoding: 7BIT User-Agent: Opera7.23/Win32 M2 build 3227 References: <200404202124.50967.dgw@liwest.at> <20040421110548.20d8e75c.cpressey@catseye.mine.nu> cc: dgw@liwest.at cc: freebsd-chat@freebsd.org Subject: Re: Beginning C++ in FreeBSD X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2004 04:01:38 -0000 On Wed, 21 Apr 2004 11:05:48 -0700, Chris Pressey wrote: > On Tue, 20 Apr 2004 23:28:48 -0600 > Dan MacMillan 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. 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. >> 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. I agree. That's why I asked for a specific example -- because I can't think of an optimization that is possible when compiling C++ code directly to binary that isn't possible when first translating C++ to C, then compiling that to binary. Doing so will obviously take advantage of any C language optimizations, and I can even imagine that there are opportunities for optimization in the decisions the compiler would make translating C++ to C. But are there lost opportunities? I'm dubious. I don't think there are. Of course, I could be wrong. I'm not that smart. That's why I asked for an example! There are few things I enjoy more (or experience less :) than finding out I'm in error. By the way, I'm thinking specifically of C vs C++ -- actually, C vs that subset of C++ needed for the object-oriented features. It's the closest apples-to-apples comparison I can think of between non-OO and OO languages, and is the comparison strongly implied by Daniela's message. > 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. -Danny