caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Martin Jambon <martin.jambon@ens-lyon.org>
To: caml-list@inria.fr
Subject: Re: [Caml-list] What are "Language extensions"?
Date: Sat, 26 Mar 2011 00:23:47 -0700	[thread overview]
Message-ID: <4D8D9483.1040608@ens-lyon.org> (raw)
In-Reply-To: <AANLkTi=-tPwd4igkDn13GWiFg+UA4_EPsx-6tC9ocKeE@mail.gmail.com>

On 03/25/11 21:30, Steven Shaw wrote:
> Perhaps it doesn't mean much when there's only one implementation of
> Objective Caml. However, if a second implementation came along then I
> guess it may only implement the core language without extensions (and
> still be considered a valid "Objective Caml").

The "language extensions" section of the manual describes features that
are perfectly usable but may be gone in the next release of the official
Objective Caml distribution (compilers etc.).

For example, there used to be a special syntax for pattern matching
against streams (Stream module). It was removed but can still be used by
preprocessing .ml files with camlp4 or camlp5.

Currently the least esoteric features that are commonly used among these
"language extensions" are in my opinion:

- assert
- integer literals for int32 and int64
- lazy expressions (but not lazy patterns)
- char range patterns
- local open (new in 3.12)
- record notations (new in 3.12)

It is easy to see workarounds if these features were to disappear from
the official implementation because they are mostly syntax. Not so sure
about the other extensions.


Martin

  reply	other threads:[~2011-03-26  7:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-26  1:12 Lauri Alanko
2011-03-26  4:07 ` Mike Lin
2011-03-26  4:30   ` Steven Shaw
2011-03-26  7:23     ` Martin Jambon [this message]
2011-03-27 18:13 ` Xavier Leroy

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=4D8D9483.1040608@ens-lyon.org \
    --to=martin.jambon@ens-lyon.org \
    --cc=caml-list@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).