caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Boris Yakobowski <ml@yakobowski.org>
To: nicolas.ojeda.bar@lexifi.com
Cc: The Caml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Deprecating -annot
Date: Fri, 9 Nov 2018 10:52:36 +0100	[thread overview]
Message-ID: <CABbVA-AgTi0dDQ9M=_Meub0CN=8mCvR825LBDVnG4ugeS3+H=g@mail.gmail.com> (raw)
In-Reply-To: <CADK7aFNbjuHdy5vJMR+qutuS_pfoEpuD+QvPk_BMXn+2GtXAVg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1533 bytes --]

Hi,

On Thu, Nov 8, 2018 at 10:16 AM Nicolás Ojeda Bär <
nicolas.ojeda.bar@lexifi.com> wrote:

> The main reason for the deprecation is that it is superseded by
> .cmt-based infrastructure (as exploited by e.g. merlin, ocp-index,
> etc).
>

I was thinking about the good old .annot days (finally, type information in
emacs!), as well as of the not-so-good-ones (generation of the .annot file
that took longer than the compilation of the file). By large, .cmt files
have been a improvement in my experience.

That being said, there is one use of .annot files that I have not been able
to port to .cmt files: finding (unsafe) uses of Pervasives.compare or
Pervasives.equal in a codebase. My workflow is as follow:
- generate the .annot files
- grep for Pervasives.( = )  or Pervasives.compare with sufficient context
- dismiss all calls that occur on a basic type (typically scalars)
- check all remaining calls for an use on an abstract or possible-cyclic
type

Clearly this process is not exactly efficient, and would be much better
handled by a compiler warning -- especially since the compiler would be
able to notice type equalities such as t = int coming from the context. So
this message must not be understood as a real suggestion to keep .annot
file in the end :)

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list https://inbox.ocaml.org/caml-list
Forum: https://discuss.ocaml.org/
Bug reports: http://caml.inria.fr/bin/caml-bugs

[-- Attachment #2: Type: text/html, Size: 1685 bytes --]

  reply	other threads:[~2018-11-09  9:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-08  9:16 Nicolás Ojeda Bär
2018-11-09  9:52 ` Boris Yakobowski [this message]
2019-02-23 18:07 ` Max Mouratov

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='CABbVA-AgTi0dDQ9M=_Meub0CN=8mCvR825LBDVnG4ugeS3+H=g@mail.gmail.com' \
    --to=ml@yakobowski.org \
    --cc=caml-list@inria.fr \
    --cc=nicolas.ojeda.bar@lexifi.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).