caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dario Teixeira <darioteixeira@yahoo.com>
To: Dmitry Grebeniuk <gdsfh1@gmail.com>,
	OCaml mailing-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Operator for Lazy.force?
Date: Thu, 31 Oct 2013 04:10:00 -0700 (PDT)	[thread overview]
Message-ID: <1383217800.46170.YahooMailNeo@web120406.mail.ne1.yahoo.com> (raw)
In-Reply-To: <CAPi0vKXA+80vOn6e1C7en=2rfMUsYjEtp_kF=0=3Y1V26sY8+Q@mail.gmail.com>

Hi,

> So theirs ( !! ) operator will override Pervasives' one.
> What's the problem?  Anyway projects you've mentioned don't use
> Lazy, so there's no chance of "operator clash".

I don't think it's that simple.  Once (!!) is "standardised" to be Lazy.force,
people encountering it when reading third-party code will expect it to have
that function, and are less likely to carefully read the third-party code to
see if it has been redefined. This is not the case right now: though (!!)
is often defined as Lazy.force, this is by no means universal, so one
still has to check.

With the above in mind, standardising (!!) to be Lazy.force will in effect
make it a bad practice to redefine it, as is the case for the other standard
operators.  Note that the only commonly redefined operators are the
arithmetic ones, and even those tend to be redefined only when there's
little chance of shadowing (cf. Batteries Float module).

All and all, standardising (!!) to be Lazy.force would result in many projects
having to use (!!!) instead, reserving the more convenient (!!) to the small
number of projects that make heavy use of Lazy.force.

Best regards,
Dario Teixeira

  reply	other threads:[~2013-10-31 11:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-30 18:51 Lukasz Stafiniak
2013-10-30 21:07 ` Dario Teixeira
2013-10-30 21:33   ` Dmitry Grebeniuk
2013-10-31 11:10     ` Dario Teixeira [this message]
2013-11-01 15:49     ` Damien Doligez
2013-11-02 19:03       ` David Allsopp

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=1383217800.46170.YahooMailNeo@web120406.mail.ne1.yahoo.com \
    --to=darioteixeira@yahoo.com \
    --cc=caml-list@inria.fr \
    --cc=gdsfh1@gmail.com \
    /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).