caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Kuba Ober <ober.14@osu.edu>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] What is a future of ocaml?
Date: Fri, 16 Jan 2009 09:56:01 -0500	[thread overview]
Message-ID: <161FB13B-7E12-4AF1-A867-AF9BAB03D4E8@osu.edu> (raw)
In-Reply-To: <1232058048.496fb6c099265@webmail.in-berlin.de>


On Jan 15, 2009, at 5:20 PM, Oliver Bandel wrote:

> Hi,
>
> Zitat von Benedikt Grundmann <benedikt.grundmann@googlemail.com>:
>
>> 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


  reply	other threads:[~2009-01-16 14:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-14  9:18 Radzevich Belevich
2009-01-14  9:35 ` [Caml-list] " David Allsopp
2009-01-14  9:51 ` Richard Jones
2009-01-14 13:34 ` Sylvain Le Gall
2009-01-14 13:44 ` [Caml-list] " Dawid Toton
2009-01-14 15:37   ` Martin Jambon
2009-01-14 15:39   ` David Allsopp
2009-01-15 12:13     ` Jacques Garrigue
2009-01-15 12:46       ` Benedikt Grundmann
2009-01-15 22:20         ` Oliver Bandel
2009-01-16 14:56           ` Kuba Ober [this message]
2009-01-15 12:51       ` David Allsopp
2009-01-15 21:08       ` Stefan Monnier
2009-01-14 16:07   ` [Caml-list] " Jérémie Dimino
2009-01-14 17:28   ` Dario Teixeira
2009-01-15 17:50     ` Richard Jones
2009-01-15 17:46   ` Richard Jones
2009-01-18 16:34     ` Xavier Leroy
2009-01-18 18:02       ` Richard Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=161FB13B-7E12-4AF1-A867-AF9BAB03D4E8@osu.edu \
    --to=ober.14@osu.edu \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).