caml-list - the Caml user's mailing list
 help / 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
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 index

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:53 ` Boris Yakobowski [this message]
2019-02-23 18:10 ` Max Mouratov

Reply instructions:

You may reply publically 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

caml-list - the Caml user's mailing list

Archives are clonable: git clone --mirror https://inbox.ocaml.org/caml-list

AGPL code for this site: git clone https://public-inbox.org/ public-inbox