From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 10DCDBC57 for ; Sun, 16 May 2010 05:19:15 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvcDAHoB70vZSMDjdWdsb2JhbACeARUBFyAFH7lEhRAE X-IronPort-AV: E=Sophos;i="4.53,239,1272837600"; d="scan'208";a="62874316" Received: from fmmailgate02.web.de ([217.72.192.227]) by mail4-smtp-sop.national.inria.fr with ESMTP; 16 May 2010 05:19:14 +0200 Received: from smtp08.web.de ( [172.20.5.216]) by fmmailgate02.web.de (Postfix) with ESMTP id 1767B160CBA57; Sun, 16 May 2010 05:19:14 +0200 (CEST) Received: from [78.43.204.177] (helo=frosties.localdomain) by smtp08.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #4) id 1ODUNl-00058q-00; Sun, 16 May 2010 05:19:14 +0200 Received: from mrvn by frosties.localdomain with local (Exim 4.71) (envelope-from ) id 1ODUNq-0004R0-LU; Sun, 16 May 2010 05:19:18 +0200 From: Goswin von Brederlow To: Jon Harrop Cc: Subject: Re: [Caml-list] about OcamIL References: <20100512151137.26894ywcpv71ixvk@imp.ovh.net> <012601caf351$e9a362e0$bcea28a0$@com> <87fx1uh5r5.fsf@frosties.localdomain> <49505E67-4974-4F0B-A6B7-0E87214E92BB@gmail.com> <20100515104348.7c6b4fd2.mle+ocaml@mega-nerd.com> <87iq6p7vv5.fsf@frosties.localdomain> <01c001caf475$79aa5f00$6cff1d00$@com> Date: Sun, 16 May 2010 05:19:18 +0200 In-Reply-To: <01c001caf475$79aa5f00$6cff1d00$@com> (Jon Harrop's message of "Sat, 15 May 2010 22:27:46 +0100") Message-ID: <87wrv4leix.fsf@frosties.localdomain> User-Agent: Gnus/5.110009 (No Gnus v0.9) XEmacs/21.4.22 (linux, no MULE) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: goswin-v-b@web.de X-Sender: goswin-v-b@web.de X-Provags-ID: V01U2FsdGVkX180JFdK/H5OqEJgpNyS+izJ/cfNmzMJgA3McJou I/cWyrkiEgGzPZhwVJEeO+YbwnyDaveRJMdBs1zBwfnhd8xk6x 9ZKTBNdxM= X-Spam: no; 0.00; runtime:01 high-level:01 non-trivial:01 high-level:01 low-level:01 ocaml:01 xmlrpc:01 haskell:01 lib:01 runtime:01 cheers:01 bytecode:01 two-way:98 mfg:98 garbage:01 Jon Harrop writes: > Goswin wrote: >> Hardly any business today has an inhomogene environment. And if the >> environment is homogene then the vm gives you 0 advantage. It just >> costs you overhead to emulate. > > A Common Language Runtime (CLR) is an obvious counter example => the shared > VM gives you safe and high-level interoperability between languages. For > example, you can pass garbage collected data structures between languages by > reference because they share a single GC. Without a CLR, you generally > resort to painstakingly copying everything for no reason and give up for > anything non-trivial (like closures) and often end up with segmentation > faults and no working code. And there we disagree. A VM does not give you savety or high-level anything in general. A VM can be as unsafe and low-level as you like. Most VMs won't stop you when you write an int to some (allocated) memory address and load a float from the same address. And BANG you have total garbage. Most VMs won't catch array/string over/underruns. And so on. The safety usualy comes from the high-level language used on top of the VM. As for interoperability you get the same if you define your CLR to be native mode with ONE specific GC. You still need to port every single languag you use to that CLR, native or VM. > I was once asked how someone might interoperate between Standard ML and > OCaml (two very closely related languages) and my answer was XMLRPC. > Contrast that with F# development where almost every program in existence > relies entirely upon seamless two-way interoperability with C# libraries > like WPF. And how do I get the F# code to use my haskell lib? The interoperability comes from F# and C# having common grounds. Not from them running in a VM. The common language runtime is the key there. > Cheers, > Jon. MfG Goswin PS: There is a java CPU so java bytecode can run native. I wonder when someone will build a F# cpu.