coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Ralf Jung <jung AT mpi-sws.org>
- To: coq-club AT inria.fr, Guillaume Melquiond <guillaume.melquiond AT inria.fr>
- Subject: Re: [Coq-Club] option to disable partially qualified Require Imports
- Date: Fri, 18 Sep 2020 16:46:09 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jung AT mpi-sws.org; spf=Pass smtp.mailfrom=jung AT mpi-sws.org; spf=None smtp.helo=postmaster AT jupiter.mpi-klsb.mpg.de
- Ironport-phdr: 9a23:JsZ+ExI7MRQFPQhGkNmcpTZWNBhigK39O0sv0rFitYgfIvjxwZ3uMQTl6Ol3ixeRBMOHsq0C07Sd7f+oGTRZp8rY7jZaKN0EfiRGoP1epxYnDs+BBB+zB9/RRAt+Iv5/UkR49WqwK0lfFZW2TVTTpnqv8WxaQU2nZkJ6KevvB4Hdkdm82fys9J3PeQVIgye2ba9vIBmsogjdq8sbjZF+JqswxRfEo3lFcPlSyW90OF6fhRnx6tqx8ZJ57yhcp/ct/NNcXKvneKg1UaZWByk8PWAv483ruxjDTQ+R6XYZT24bjBlGDRXb4R/jRpv+vTf0ueR72CmBIM35Vqs0Vii476dqUxDnliEKPCMk/W7Ni8xwiKVboA+9pxF63oXZbp2ZOOZ4c6jAZt4RW3ZPUdhNWCxAGoO8bpUAD+wdPeZDsoLxo0ICoQaiCQWwAe/izCJDiH3r0q0gy+kvDw/G0gw9EdwNvnrbotr6O6UOXu6616TI0TbOYulK1Tvh5oXFcBYsquyMU7JqdsrRzFEiGR/fgVWUp4zuIjeb1vkLs2iU8uFtUuCvi3MhqwF+uTWvw98siojQioIOxFHE7j91wIEvJd23UUN2Z8OvH5RMuS+ALYR2Xt8iTH9yuCY80rAKp522cSgOxZkj2xLSa/2KfYaV7xzsSeufITh1iXZ7db+hmRq/8Eitx/PyWMSp3ltHoCVIn93Qu30C1xHe6MyKR/1g9UmiwTaCzx3f5+9ALEwuiKbWL4Qtz70xm5YJrEjOHjf6lUf0gaOMa0kp/vSk5/76brjnqZKQLZF4hh/+P6koh8exG/43MhIUUGie4em81KPs/Un+QLhSjP02j7HZsJHGJcsFvK61GQpV0p4i6xqmDDem1M8YkmIdIFJAYBKHgJLlNEzQL/zgDPe/hUqjkCtzyvzbMLDsBo/BImXHnbv7frtw6lRQxBczwNxH4pJbELABIPb9Wk/rs9zYCwc0Mw6pw+bhB9VwzYYeWXqOAqOAK6PTv0SI6vgoI+mWa48ZoCz9JOQ95/7ykX85nkcQfay30psTcXC4A/VmI0KfYXf3g9YBEGIKsREkTOPwklGCUDhTZ2yzX60m/D07BpimB5/ZRo+xmLyBwDu7HppOa29aDVCMCG7keJmAW/cRcy2fOdRhkzwBVbi5UYAtzxCutAngy7pmNOXY4CMYtYiwnORysubUjFQ58SF+J8WbyWCECW9u2isnWj4y2KlipEE171qHyLV5hPpUXYhc+vJNVg4nMJOayuF+Es3zXQTNVtaPUlevBNu8V2IfVNU0luUHZ0g1OcikgViX3TesDJcQj73OH4MvtKXG0C6idI5G13/a2fx53BEdScxVODjj3/YnrlSBN8vyi0yc0p2SW+EExieUrzWG1WvLp15DFglqXvedBC1NVg7ttd38o3j6YfquBLAgaFYTy9OaK7dHcJvslVQDR/P4MpLbe233l2riXU/ZlIPJV5LjfiAm5AuYDUEFlw4J+nPfblo7HibkuH3FSjt0GgC2bg==
Hi Guillaume,
>>> Another possibility would be to relax some requirements of From-Require.
>>> Currently, "From A.B.C Require D.E.F" means that not only the path
>>> should start with A.B.C and finish with D.E.F, but also that there
>>> should be no overlap between A.B.C and D.E.F. If the second constraint
>>> was removed, then Require would become non-ambiguous for people who have
>>> to use messy libraries.
>>
>> I don't see how accepting even more paths for a given import can possibly
>> resolve any ambiguities? "From A.B.C Require A.B.C" would then match both
>> "A.B.C" and "A.B.C.*.A.B.C".
>
> Because I am assuming the library's author is not dumb enough to have a
> hierarchy A/B/C/**/A/B/C.v.
>
> At some point, we have to accept that we cannot always win against dumb
> or malicious users. They will always find a way to circumvent the system.
Well then why do we even do typechecking, users won't be dumb enough to write
ill-typed code, right? /s
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
- Re: [Coq-Club] option to disable partially qualified Require Imports, (continued)
- Re: [Coq-Club] option to disable partially qualified Require Imports, Ralf Jung, 09/17/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Gregory Malecha, 09/17/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Théo Zimmermann, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Ralf Jung, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Théo Zimmermann, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Gaëtan Gilbert, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Guillaume Melquiond, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Ralf Jung, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Guillaume Melquiond, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Abhishek Anand, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Ralf Jung, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Andrew Appel, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Andrew Appel, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Ralf Jung, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Gaëtan Gilbert, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Gaëtan Gilbert, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Guillaume Melquiond, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Ralf Jung, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Guillaume Melquiond, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, jonikelee AT gmail.com, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Théo Zimmermann, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Ralf Jung, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Jeremy Dawson, 09/19/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Théo Zimmermann, 09/19/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Ralf Jung, 09/17/2020
Archive powered by MHonArc 2.6.19+.