Here's how it works with Haskell:

    The Prelude module is imported automatically into all modules as if
    by the statement `import Prelude', if and only if it is not imported
    with an explicit import declaration. This provision for explicit
    import allows values defined in the Prelude to be hidden from the
    unqualified name space. The Prelude module is always available as a
    qualified import: an implicit `import qualified Prelude ' is part of
    every module and names prefixed by `Prelude.' can always be used to
    refer to entities in the Prelude.

In terms of Clojure's namespace mechanisms:

- clojure.core is always :required.
- clojure.core is fully :used unless explicitly :used by user code.

-Per

On Wed, May 5, 2010 at 10:36 PM, Laurent PETIT <laurent.pe...@gmail.com> wrote:
> Hello,
>
> After thinking twice about it, ns does 2 special things for clojure.core 
> today:
> 1. if no mention of clojure.core (indirectly via refer-clojure),
> consider that clojure.core must entirely be 'use d in the namespace
> 2. if refer-clojure is used, bypass 1. and do whatever is in refer-clojure
>
> what about getting rid of refer-clojure in 'ns (or probably deprecating it).
> 1. if no mention of clojure.core (via require or use), consider that
> clojure.core must entirely be 'use d in the namespace
> 2. if clojure.core is 'use d or 'refer ed, bypass 1.
>
> Bonus for the user:
>  * one less special case to handle (no need to remember refer-clojure)
>  * same suppleness as with refer-clojure, with the extra-bonus of
> being able to requiring clojure.core (think of namespaces dedicated to
> dsls where you will want to provide only certain clojure.core vars to
> dsl users, and/or make it clear that the user is not using dsl
> "primitives" but clojure "primitives" by requiring clojure.core :as
> core etc.)
>
> What do you think about that ?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to