Johannes Waldmann wrote:
>Frank Christoph writes:
>
>> The convention should be reversed: by default, a module import is qualified.
>> That eliminates the need for both "qualified" and "hiding". You can rename
>> your identifiers explicitly, as God intended.
>
>are we talking Haskell98 here? anyway, i'd like to second that proposal.
In the best of all possible worlds. Realistically there's no hope, I imagine, since
there are few other imaginable syntactic changes which could possibly break so many
programs. :)
>even more, i'd like to see Ada naming convetions applied:
>
>you can "with" a package (import a module) (you get qualified visibility)
>you can "use" a previously withe-ed package (unqualified visibility)
>and you can "rename" identifiers. (that would probably be the same
>as "=" for Haskell since we already got referential transparency).
>"with" clauses _must_ be in the header,
>but "use" clauses may also be written for local blocks
>(an additional plus, IMHO)
Let me get this straight: you want to replace "import qualified" with "with", "import"
with "use", and "=" with "rename"? That sounds like it's 180 degrees away from what I
propose. My intention was to eliminate the need for either new keywords or special
syntactic categories for "qualified" and "hiding". To me it sounds like you just want
to rename the identifiers.
Kris Aerts wrote:
>I'd like to support this proposal. The 'with' and 'use' perfectly explain
>the intention of the import, and in my humble opinion to non-native
>English speakers even better than qualified vs non-qualified.
FWIW, I find it much harder to distinguish "with" and "use" than "import" and "import
qualified". Frankly, I have the same problem with "load" and "use" in ML systems. It
must be an acquired taste, like OSes and filepath syntax...
--FC