From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.5 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 006B4BB84 for ; Fri, 16 Jan 2009 15:56:04 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AukQAFgucElDWxLCYGdsb2JhbACBbJINHiqtP4YlhiWFcg X-IronPort-AV: E=Sophos;i="4.37,277,1231110000"; d="scan'208";a="22590862" Received: from ip67-91-18-194.z18-91-67.customer.algx.net (HELO server1.bertec.net) ([67.91.18.194]) by mail1-smtp-roc.national.inria.fr with ESMTP; 16 Jan 2009 15:56:04 +0100 Received: from pc54.bertec.net (pc54.bertec.net [192.168.2.54]) by server1.bertec.net (Postfix) with ESMTP id 6C6CE1056C4 for ; Fri, 16 Jan 2009 09:56:02 -0500 (EST) Message-Id: <161FB13B-7E12-4AF1-A867-AF9BAB03D4E8@osu.edu> From: Kuba Ober To: caml-list@yquem.inria.fr In-Reply-To: <1232058048.496fb6c099265@webmail.in-berlin.de> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: [Caml-list] What is a future of ocaml? Date: Fri, 16 Jan 2009 09:56:01 -0500 References: <1231924711.2711.11.camel@serphost.localdomain> <496DEC48.7000906@wp.pl> <001801c9765e$4fabc3b0$ef034b10$@com> <20090115.211335.27794984.garrigue@math.nagoya-u.ac.jp> <9b415f950901150446u3f4781e3n3dc2dcb8e2732263@mail.gmail.com> <1232058048.496fb6c099265@webmail.in-berlin.de> X-Mailer: Apple Mail (2.930.3) X-Spam: no; 0.00; ocaml:01 bandel:01 grundmann:01 grundmann:01 ocaml's:01 model:01 ocaml:01 syntax:01 lambda:01 lacks:01 bytecode:01 bytecode:01 ocaml's:01 high-level:01 doable:01 On Jan 15, 2009, at 5:20 PM, Oliver Bandel wrote: > Hi, > > Zitat von Benedikt Grundmann : > >> I would even go so far as to say that >> >> One of the advantages of OCaml's current development model is >> that it is not changing the language very quickly. >> >> OCaml is already a big language (featurer/syntax and so on wise), >> it should (IMHO) not grow a lot more at least not without giving >> each change a lot of thought. > [...] > > > Yes, I agree fullheartedly! > > So many other languages evolve a lot, and there is enough > busy-ness / daily business, that needs attention. > Always changing the API or other properties of the language would > be a factor of annoyance. > > Such permanent changes and "add-ons" is/are necessary, when there > is a language that is quite weak, so that it is necessary to be > enhanced > permanently. > > But OCaml is such a good language, that it can compete with it's > language features without that kind of ADH-disorder, that many other > environments offer. Such ADHD is provided as an advantage, but it > shows me, that there is not only room for enhancement... there also is > a necessity for enhancement of such languages! > > And I don't say, OCaml is perfect or any way of making it better > should > be deined. But it's strong with it's features. > > And with it's it-does-not-change-every-week it is a good base for > long-term developments, IMHO. > > Many languages, which will be changed permanently, > also incorporate functional features. I have heard that C++ now has > lambda terms... but it lacks many other things... OCaml-based Prolog can be as fast as SWI Prolog in principle since all SWI Prolog does is compile to bytecode and run a bytecode virtual machine written in C. What you were doing, most likely, is interpreting instead of compiling. I.e. you were perhaps walking the parsed representation of predicates? Writing a Prolog implementation in OCaml can be a bit less work than doing it in C, since your VM can reuse OCaml's garbage collector, and of course it can use features of a real high-level programming language. It should be entirely doable to write a Prolog-to-OCaml cross-compiler. The result should be faster than SWI Prolog, methinks. Rant: C++ has had a pure functional metaprogramming language built in for half a decade now (or is it longer?). This is something that unfortunately even OCaml doesn't have. Of course LISP and Scheme's macro system blows that out of the water, but there is a whole class of problems that are quite hard to cleanly solve without compile-time execution of some sort. Of course, metaprogramming is an art, that's why there are whole books about it (Graham's "On Lisp" and Abrahams/Gurtovoy's "C++ Template Metaprogramming"). It's true, of course, that C++'s metaprogramming language feels like writing for the Turing machine, but it's there, and it does find applications. camlp4 has to be an external pass on the source code because there's no way to get OCaml's compiler to execute code ;) Cheers, Kuba