On Jun 12, 2017 4:55 PM, "Alex Miller" <a...@puredanger.com> wrote:

I think it's your responsibility to make specs "sufficiently unique".
Prefixing with a standard namespace you control seems like it would work.


pls excuse me for butting in, but i wonder what happens when i require 14
namespaces and 7 of them register foo.bar/baz in the global registry? who
wins? we don't have this prob with vars; if i require foo.bar and foo.baz,
and they both define x, no prob.  but spec namespacing is different, no?
 the namespace you use for a spec is independent of the ns in which you
define/specify it.  which defeats the purpose of namespacing.  clojure
namespacing is controlled; spec namespacing is not.  which leads me to
think that maybe spec registries should be namespaced, just like everything
else.


There is an enhancement winding through jira to support the ability to
remove a spec from the registry by doing (s/def ::foo nil) and I expect
that to go in soon. https://dev.clojure.org/jira/browse/CLJ-2060



On Monday, June 12, 2017 at 4:26:14 PM UTC-5, Mark wrote:
>
> > What problem would be solved by each customer having his own registry?
>
> Name clashes (to be fair, elsewhere on this thread, Sean Corfield
> suggested prefixing and this would certainly work).
>
> > What do you mean by retracting specs? And what problem would this solve?
>
> Retracting a spec means that it's not in use anymore. In this instance,
> I'm just imagining my users' requirements.  I can foresee them wanted to
> indicate that a particular spec is no longer in use.  I suppose I could
> always "change" the spec to be (constantly false).
>
>
>
> On Monday, June 12, 2017 at 2:06:26 PM UTC-7, Alan Forrester wrote:
>>
>> On 12 Jun 2017, at 20:41, Mark <markad...@gmail.com> wrote:
>>
>> > > I don't see how that limits it to dev use cases. Can you explain more
>> why you say that?
>> >
>> > I understand (and completely agree with) the assumption of a global
>> namespace for spec names.  The scope of that namespace is all Clojure
>> developers.  I want a different scope:  the users of my app.  To continue
>> on this thinking, if my app was shared among different customers, each
>> customer would have their own namespace - their own registry.
>>
>> What problem would be solved by each customer having his own registry?
>>
>> >  Further, I suspect that the lifecycle for specs in my app's scope will
>> be a bit different than the Clojure developer scope.  Specifically, I can
>> see that some customers will insist on retracting specs.
>>
>> What do you mean by retracting specs? And what problem would this solve?
>>
>> Alan
>
> --
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 unsubscribe from this group and stop receiving emails from it, send an
email to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to