caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: moreno pedro <moreno.pedro@epitech.eu>
To: octachron <octa@polychoron.fr>,
	"Daniel Bünzli" <daniel.buenzli@erratique.ch>
Cc: Nils Becker <nils.becker@bioquant.uni-heidelberg.de>,
	Caml-list <caml-list@inria.fr>
Subject: RE : [Caml-list] destructive local opens
Date: Thu, 6 Aug 2015 13:23:19 +0000	[thread overview]
Message-ID: <svqwb1x90x9h3rn8kdu8cbl5.1438823217651@email.android.com> (raw)
In-Reply-To: <55BFAC17.3050406@polychoron.fr>

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




Envoyé depuis un mobile Samsung



-------- Message d'origine --------
De : octachron <octa@polychoron.fr>
Date : 03/08/2015 19:00 (GMT+00:00)
A : Daniel Bünzli <daniel.buenzli@erratique.ch>
Cc : Nils Becker <nils.becker@bioquant.uni-heidelberg.de>,Caml-list <caml-list@inria.fr>
Objet : Re: [Caml-list] destructive local opens


Le 08/03/15 18:51, Daniel Bünzli a écrit :

1. Given a M.( * ) without warning the * may be the one of M or the one in scope. Ambiguous, can't be resolved locally.

2. Given a M.( id ) without warning, if [id] is in scope I *know* this [id] is being used. If it's not I know M.id is being used. No ambiguity, can be resolved locally.

If you allow each identifier in a module to sport an @shadow annotation you lose 2. which I find a  very valuable property. Without it, given that identifiers are much more widespread than operators, we get a much more ambiguous language.

It is a very valid point. However, I would argue that 1. and 2. are transformed to

1. Given a M.( [edsl_keyword] ) is the one of M. If I know the EDSL keywords, there is no ambiguity.

2. Given a M.( non_keyword ) without warning, if [non_keyword] is in scope then [non_keyword] is
being used. Otherwise, [M.non_keyword] is being used. No global ambiguity.

This approach, contrarily to yours, has a major disadvantage: its relies on a tacit agreement on the
EDSL keywords. At the same time, it allows EDSL authors to tailor the warnings to the EDSL
context. If the keyword list is small/sensible enough, it might result in better warnings.

But yes, implicit agreements are clearly more brittle than broad rules. A (over?)complicated
solution might be to add module alias annotation in order to modify shadow annotations locally
(e.g. " module N = M [@@only_shadow "+"] ").

Regards,
octachron.


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

  reply	other threads:[~2015-08-06 13:23 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-03 13:39 Nils Becker
2015-08-03 13:43 ` Thomas Refis
2015-08-03 13:45 ` Daniel Bünzli
2015-08-03 13:47   ` Daniel Bünzli
     [not found]     ` <55BF75F6.1040006@bioquant.uni-heidelberg.de>
2015-08-03 14:24       ` Daniel Bünzli
2015-08-03 14:37         ` Gabriel Scherer
2015-08-03 14:43           ` Daniel Bünzli
2015-08-03 15:10           ` octachron
2015-08-03 15:22             ` Daniel Bünzli
2015-08-03 16:13               ` octachron
2015-08-03 16:51                 ` Daniel Bünzli
2015-08-03 17:18                   ` Hendrik Boom
2015-08-03 17:59                   ` octachron
2015-08-06 13:23                     ` moreno pedro [this message]
2015-08-04  6:51         ` Petter Urkedal
2015-08-04  9:33           ` Goswin von Brederlow
2015-08-05  6:40             ` Petter A. Urkedal
2015-08-05 10:16               ` David Allsopp
2015-08-06  9:35               ` Goswin von Brederlow
2015-08-04 13:50           ` Hendrik Boom
2015-08-04  9:26         ` Goswin von Brederlow
2015-08-04  9:38           ` Daniel Bünzli
2015-08-04 12:26             ` vrotaru.md
2015-08-04 13:12               ` David Allsopp
2015-08-04 13:17                 ` Jeremy Yallop
2015-08-04 13:54                   ` vrotaru.md
2015-08-04 15:25                   ` Drup
2015-08-04 22:22                     ` vrotaru.md
2015-08-04 22:55                       ` Hendrik Boom
2015-08-05  4:52                         ` Gabriel Scherer
2015-08-04 13:14               ` Ivan Gotovchits
2015-08-14 10:55                 ` Goswin von Brederlow
2015-08-14 11:28                   ` Drup
2015-08-18 11:11                     ` Goswin von Brederlow
2015-08-18 12:52                       ` David Allsopp
2015-08-18 13:00                         ` Gabriel Scherer
2015-08-18 22:26                           ` Anthony Tavener
2015-08-19 13:55                             ` Oleg
2015-08-19 14:13                               ` John Whitington
2015-08-19 15:47                                 ` Hendrik Boom
2015-08-19 15:52                             ` Hendrik Boom
2015-08-19 18:09                               ` Anthony Tavener
2015-08-19 15:55                             ` Simon Cruanes
2015-08-19 16:42                               ` Arthur Wendling
2015-08-19 21:15                               ` octachron
2015-08-20  8:06                                 ` Romain Bardou
2015-08-20 17:03                                   ` Yotam Barnoy
2015-08-20 19:19                                     ` Erkki Seppala
2015-08-06  9:23               ` Goswin von Brederlow
2015-08-06  9:21             ` Goswin von Brederlow
2015-08-06 10:19               ` Daniel Bünzli
2015-08-06 13:36                 ` Hendrik Boom
2015-08-14 10:57                   ` Goswin von Brederlow

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=svqwb1x90x9h3rn8kdu8cbl5.1438823217651@email.android.com \
    --to=moreno.pedro@epitech.eu \
    --cc=caml-list@inria.fr \
    --cc=daniel.buenzli@erratique.ch \
    --cc=nils.becker@bioquant.uni-heidelberg.de \
    --cc=octa@polychoron.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).