From: Jacques Carette <carette@mcmaster.ca>
To: Vincent Hanquez <tab@snarc.org>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Compiler feature - useful or not?
Date: Thu, 15 Nov 2007 08:48:23 -0500 [thread overview]
Message-ID: <473C4E27.60506@mcmaster.ca> (raw)
In-Reply-To: <20071115105320.GA29693@snarc.org>
Vincent Hanquez wrote:
> On Thu, Nov 15, 2007 at 12:23:25AM -0600, Edgar Friendly wrote:
>
>> But camlp4 holds back real development of the OCaml Community
>> by dividing the language into incompatible splinter dialects or forcing
>> us to code in pure OCaml which has little sugar.
>>
>
> I'm glad that some people feels the same way about camlp4 !
> this is really sad, that people thinks camlp4 is a great idea ...
>
Come now, be fair, camlp4 has both advantages and disadvantages.
Advantages:
- Allows you to *prove* that some syntactic sugar can make a big
difference in writing code. This is 2 orders of magnitude more
effective in convincing people than just arguing for it (on caml-list,
in person, whatever). Some extensions become popular because they have
proved themselves this way. What is lacking is a process by which these
can be integrated into the language.
- Allows you to show that some boilerplate code can be eliminated. This
is even better than the above, because every such instance is really a
research problem in disguise: how does one design a type system that can
show that this purely syntactic manipulation is correct?
- Allows you to embed a DSL into OCaml with quite a bit of ease and
freedom. One of the reasons to use campl4 instead of OCaml directly is
that for embedding DSLs, it is very frequent that lazyness is needed,
something less comfortable in OCaml.
Disadvantages:
- It splinters the language into dialects.
- It makes errors in the source code of user programs difficult to track
[anyone who has ever debugged camlp4-enabled programs have seen this]
- Bugs in the extension itself are fantastically difficult to debug.
Personally, I think the best situation would be if camlp4 were
unnecessary. But there is a lot of PL research to be done before that's
possible. And in the meantime, the extensions that people choose to
write in camlp4 communicate very loudly what users of OCaml really want
[as they are willing to put in serious effort into ``adapting'' the
language to their needs]; when I used to be a language developer (on
another system and, sadly, before I got proper training to do so), I
weighted user requests by how much effort the user had put into the
request. This annoyed loudmouths and pleased hardcore users, which
seemed fine with me.
Jacques
next prev parent reply other threads:[~2007-11-15 13:48 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-13 23:41 Edgar Friendly
2007-11-14 0:08 ` [Caml-list] " Yaron Minsky
2007-11-14 0:21 ` Martin Jambon
2007-11-14 7:58 ` Pierre Weis
2007-11-14 12:37 ` Alain Frisch
2007-11-14 13:56 ` Virgile Prevosto
2007-11-14 14:35 ` Pierre Weis
2007-11-14 16:38 ` Alain Frisch
2007-11-14 18:43 ` Pierre Weis
2007-11-14 19:19 ` Edgar Friendly
2007-11-15 6:29 ` Alain Frisch
2007-11-15 13:26 ` Pierre Weis
2007-11-15 17:29 ` Edgar Friendly
2007-11-15 20:28 ` Fernando Alegre
2007-11-16 0:47 ` Brian Hurt
2007-11-15 22:37 ` Michaël Le Barbier
2007-11-15 22:24 ` Michaël Le Barbier
2007-11-16 0:30 ` Yaron Minsky
2007-11-16 1:51 ` Martin Jambon
2007-11-16 9:23 ` Alain Frisch
2007-11-16 14:17 ` rossberg
2007-11-16 15:08 ` Martin Jambon
2007-11-16 16:43 ` Martin Jambon
2007-11-16 16:46 ` Till Varoquaux
2007-11-16 17:27 ` Edgar Friendly
2007-11-16 17:47 ` Martin Jambon
2007-11-16 17:54 ` Edgar Friendly
2007-11-16 18:10 ` Fernando Alegre
2007-11-16 19:18 ` David Allsopp
2007-11-16 19:32 ` Fernando Alegre
2007-11-16 19:50 ` Gerd Stolpmann
2007-11-16 17:31 ` Fernando Alegre
2007-11-16 17:43 ` Edgar Friendly
2007-11-16 0:46 ` Christophe TROESTLER
2007-11-16 8:23 ` Andrej Bauer
2007-11-16 8:58 ` Jean-Christophe Filliâtre
2007-11-16 9:13 ` Andrej Bauer
2007-11-16 9:48 ` Christophe TROESTLER
2007-11-14 16:57 ` Edgar Friendly
2007-11-14 21:04 ` Pierre Weis
2007-11-14 22:09 ` Edgar Friendly
2007-11-15 0:17 ` Jacques Garrigue
2007-11-15 6:23 ` Edgar Friendly
2007-11-15 10:53 ` Vincent Hanquez
2007-11-15 13:48 ` Jacques Carette [this message]
2007-11-15 14:43 ` Jon Harrop
2007-11-15 16:54 ` Martin Jambon
2007-11-14 16:09 ` Edgar Friendly
2007-11-14 16:20 ` Brian Hurt
2007-11-14 11:01 ` Gerd Stolpmann
2007-11-14 10:57 ` Jon Harrop
2007-11-14 14:37 ` Zheng Li
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=473C4E27.60506@mcmaster.ca \
--to=carette@mcmaster.ca \
--cc=caml-list@yquem.inria.fr \
--cc=tab@snarc.org \
/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