Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> But if the official spec doesn’t restrict get, Spec will let people redefine the spec for get for themselves.

> They can choose whatever subset of the type they want.

Total clojure-spec noob question: is this type scoped somehow, or does using your own type mean chasing down bugs in libraries that assume a looser version?



Specs are not scoped. There's a global registry. You may end up chasing other people's bugs.


It's scoped in that you choose what gets loaded. I think it's generally a good idea for a library to provide specs as an optional namespace and let you choose whether and when to load it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: