From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA11343; Tue, 15 Jan 2002 16:35:58 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA11770 for ; Tue, 15 Jan 2002 16:35:57 +0100 (MET) Received: from relay-3v.club-internet.fr (relay-3v.club-internet.fr [194.158.96.114]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g0FFZvb08507 for ; Tue, 15 Jan 2002 16:35:57 +0100 (MET) Received: from warp (lns05v-3-24.w.club-internet.fr [212.194.86.24]) by relay-3v.club-internet.fr (Postfix) with SMTP id 5D0E81799; Tue, 15 Jan 2002 16:35:55 +0100 (CET) Message-ID: <005901c19dd9$e7837260$9600a8c0@warp> From: "Warp" To: "Andreas Rossberg" Cc: "OCaml" References: <3C4408E0.EB34C3B2@ps.uni-sb.de> Subject: Re: [Caml-list] More OCaml+windowing system questions Date: Tue, 15 Jan 2002 16:32:50 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > > However, C and C++ are extremely portable, which is very > > appealing to me. > > Sorry, I cannot resist commenting on that particular statement, because > it still seems to be such a frighteningly common misconception. And so can't I resist to comment your comment :) > This statement confuses two issues: portability and availability. C > certainly is available on pretty much every system. But this says > nothing about portability of C code - C and C++ are definitely among the > least portable languages in use today. There effectively is no > non-trivial C program that is portable according to the language > standard (ie. does not explore undefined/unspecified behaviour one way > or the other - most times you are not even aware). I think that all the features of the C/C++ languages ARE portable. Why shouldn't they be ? All you have to do is to compile with the good compiler ( gcc for instance ). BUT then, you have to be aware of some things that are not permitted ( like DWORD access on odd memory addresses on Solaris ) and to use a portable API - like ACE, or OpenGL - to do "special" things. In fact, the limits of portability C/C++ are in the choice of the API you make, and in the fact you CAN write very-low-level code when you should use an API. Thus, there is a big difference between portabily ( source code can be recompiled on another machine and will work fine ) and "super-portability" compiled code will work fine - if you got the 'launcher' ) : and that's one of the reasons of Java's sucess Warp ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr