caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Michel.Mauny@inria.fr (Michel Mauny)
To: Pierre.Weis@inria.fr (Pierre Weis)
Cc: christo@nextsolution.co.jp, caml-list@pauillac.inria.fr
Subject: Re: Language improvements (?)
Date: Thu, 25 Jul 1996 14:26:40 +0200 (MET DST)	[thread overview]
Message-ID: <199607251226.OAA01398@pauillac.inria.fr> (raw)
In-Reply-To: <199607240844.KAA21840@pauillac.inria.fr> from "Pierre Weis" at Jul 24, 96 10:44:17 am


> > Third, since the trend in O'Caml is toward curried function types,
> > it would be useful to be able to section binary operators as in
> > Haskell, e.g., "(1+)" would mean "(function x -> 1 + x)".

Your example works in ocaml: (+) 1 denotes the function above. But,
the only way to partially apply (+) to its second argument is to give
a name to the first one as in (fun x -> x+2).

Personnally, I don't think sections are really useful.

> >   And, at the risk of instigating a syntax war, I would prefer a more
> > Haskell-like syntax overall; for example, offside scoping,

I don't like it either. (And it would be a really pain to implement it
with Yacc, I think -- if ever possible.)

> > [Type constructors with] uppercase types so
> > there is no need for quotes in front of type variables,

> No, no, we already exhausted uppercase conventions with modules,
> constructors, labels, and let bound identifiers.

Here, I disagree with Pierre: it would be possible because type
constructors occur only in very specific contexts. The parser just has
to consider that a type constructor (putting aside the arrow) is a
(possibly empty) module access path preceeding an uppercase
identifier, that is the type name. There is no conflict with the other
usage of uppercase idents (data constructors) because they occur in
different contexts.

However, writing type expressions as in Haskell is probably just a
cosmetic issue.

-- 
Michel





  parent reply	other threads:[~1996-07-25 16:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-24  6:30 Frank Christoph
1996-07-24  8:44 ` Pierre Weis
1996-07-24  9:53   ` Frank Christoph
1996-07-24 17:04     ` Georg Bauer
1996-07-25  2:12     ` Ian T Zimmerman
1996-07-25 12:26   ` Michel Mauny [this message]
1996-07-25 17:14 Pierre Weis

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=199607251226.OAA01398@pauillac.inria.fr \
    --to=michel.mauny@inria.fr \
    --cc=Pierre.Weis@inria.fr \
    --cc=caml-list@pauillac.inria.fr \
    --cc=christo@nextsolution.co.jp \
    /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).