Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] option to disable partially qualified Require Imports

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] option to disable partially qualified Require Imports


Chronological Thread 
  • From: Gaëtan Gilbert <gaetan.gilbert AT skyskimmer.net>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] option to disable partially qualified Require Imports
  • Date: Fri, 18 Sep 2020 17:06:09 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=gaetan.gilbert AT skyskimmer.net; spf=Pass smtp.mailfrom=gaetan.gilbert AT skyskimmer.net; spf=None smtp.helo=postmaster AT relay1-d.mail.gandi.net
  • Ironport-phdr: 9a23:6DPhBx9MqdnRAv9uRHKM819IXTAuvvDOBiVQ1KB21+McTK2v8tzYMVDF4r011RmVBNqds6wP1bWe8/i5HzBZv9DZ6DFKWacPfidNsd8RkQ0kDZzNImzAB9muURYHGt9fXkRu5XCxPBsdMs//Y1rPvi/6tmZKSV3wOgVvO+v6BJPZgdip2OCu4Z3TZBhDiCagbb9oIxi6sAfcutMKjYZjJao8yxnEqWZMd+hK2G9kP12ekwv968uq4JJv7yFcsO89+sBdVqn3Y742RqFCAjQ8NGA16szrtR3dQgaK+3ARTGYYnAdWDgbc9B31UYv/vSX8tupmxSmVJtb2QqwuWTSj9KhkVhnlgzoaOjEj8WHXjstwjL9HoB+kuhdyzZLYbJ2TOfFjeK7WYNEUSndbXstJSiJPHI28YYsMAeQPM+lXoIvyqEcBoxalGQmjH/nixiNUinL436A31fkqHwHc3AwnGtIDqHXao8/pM6cOS++1yrHHwzTCb/NSwjjy9pLIcgw8qvyLUrJ/a9TeyVU1GAPDlFmQpo3lPzeO2esTqWib8/FtVfmsi28nsAFxoTmvxsIpiobXnIIZ0FbE+jtlwIssI9CzVUF0b8K+HpRKqyGaK5V5QtkkQ2xwtys316MKtJ+6cSYFyZkqwxrSZvObfoSV/h/vSuifLDN8iXxre7+zmRe//0iuxODhV8S531ZHoyVKnNTPtn4A2Rre4dWJRPt6+0euwzeP1wbL5+FFJ0A0j6vbJIQ7zr4+jJoet1nIECzumEjukqOaa0cp9vKq5uj7eLnqu5yROoFuhg3jNqkjlNSzDfk2PwUBRWSX5OCx2Kf+8UD7RLhGlOA6n6vdvZ3cOM8VvLS2AxVP3YYm8xu/Dymp0NAfnXQfNlJKZhaHgJLpOl3TOfz3EO2zg1G2nzdqw/DKJLLhDY/LLnfekbftZ7B95FBAyAYrzNBf4YxbCq0ZLf7tR0P8tsbUAx0lPwCu3urqC9tw2pkDVW+LDKKVKKbSvkWJ5uIrLemMfogVuDPlJvgq/fHhk2M5lkUbfaWz0psXaXS4Ee94LEWDfXrhmcwBEWQKvwolT+zqiViCUTtNaHaoRa484C80CJ6+AYfZWo+tmKCB3Du8HpBOem9GDUmMHW70eIWARvcDczmfItRhkzwBTbiuUZUt1RCotA/gyrpoNPDY+iMCtcGr6N8g7OrK0Bo26DZcDsKH0mjLQXsnsHkPQmoZ1SNjqEpK5VaH26Vin7QMGtVe+/pPFAg7MZTR1fBSENPjQQHAe9KEUhCgT8nwUmJ5dc4439JbOxU1IN6llB2Wh3P7UY9QrKSCAdkPyoyZ2nHwI8hnzHOfivs6jEg9QcpKMGC8wKhy61qKXtKbowCij6+vMJ8k8mvV7m7akziVv1BDUw91VKjfG3YSehmO9Imr1gb5V7arTI8fHE5BxMqFcPYYcNDthEQfAfulPd3fZyS+kmG8BFCOy6/eNIc=

The Coq module system dates from V7:
https://coq.inria.fr/refman/history.html#versions-7
>The version V7 is a new implementation started in September 1999 by
Jean-Christophe Filliâtre. This is a major revision with respect to the internal
architecture of the system. The Coq version 7.0 was distributed in March 2001

I don't know when Require was introduced but surely it was earlier than that,
so its interaction with then nonexistent modules was not considered.

Gaëtan Gilbert

On 18/09/2020 16:54, Andrew Appel wrote:
Oops, let me clarify.

The sloppiness of Require paths, which is the subject of this thread, has
bothered me for years.  That's the +1.

Regarding the Coq module system -- I love the Coq module system, which is
based on the OCaml module system, which is based on the Standard ML module
system, a landmark achievement in computer science developed primarily by
David MacQueen between 1984 and 1995, with contributions from Mads Tofte and
Xavier Leroy.

-- Andrew


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

*From: *"appel" <appel AT princeton.edu>
*To: *"coq-club" <coq-club AT inria.fr>
*Sent: *Friday, September 18, 2020 10:50:00 AM
*Subject: *Re: [Coq-Club] option to disable partially qualified Require
Imports

+1


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

*From: *"Ralf Jung" <jung AT mpi-sws.org>
*To: *"coq-club" <coq-club AT inria.fr>, "Guillaume Melquiond"
<guillaume.melquiond AT inria.fr>
*Sent: *Friday, September 18, 2020 10:46:09 AM
*Subject: *Re: [Coq-Club] option to disable partially qualified
Require Imports

Seriously though, I do not understand this attitude.  No other
language that I
know of has a module system as strange as Coq's (maybe this is
inherited from
OCaml?), and yet you claim that it's the library author's fault for
not taking
care in designing their library to work around this quirk, rather
than the
language designer's fault for having designed something strange.  
(Probably the
language designer had a good reason and this was solving a concrete
problem, but
putting the blame on the library is just unfair. And you haven't
argued for why
Coq's semantics make any sense, either.)

This is not about malicious users, it is about people coming to Coq
with what I
consider reasonable expectations having their code break for reasons
that are
really hard to figure because Coq violates assumptions formed when
learning
pretty much any other language. Even the notoriously sloppy
JavaScript requires
precise imports! I still remember my surprise when I learned about
"-R"
semantics... it remains a mystery to me how it seemed like a good
idea to just
recursively slap everything into the global namespace. And then when
"From ...
Require" was introduced I was very surprised to learn about its path
matching
semantics, I had not even realized that regular "Require" was not
doing
full-path matching either. For what is otherwise a system that is
extremely
picky about which terms it accepts (for good reasons!), this stands
out like a
sore thumb.

There probably is a reasonable explanation for this. But dismissing
the concern
as only affecting "dumb" users is not reasonable.

Kind regards,
Ralf





Archive powered by MHonArc 2.6.19+.

Top of Page