This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
is there a null pointer safe version of this? '' (.. this getEventData getCustomer getUserGuid) ''
some-> will work but make sure there is no side effects, which will be strange for java
I remember reading somewhere in Clojurians not too long ago that core.spec
had changed Clojure to such a degree that it demanded a change to many intros to the language. Can anyone point me towards a "spec-centric" tour/intro of Clojure?
probably the change that they were referring to is the fact that you need spec on the classpath to use the clojure jar now. So you would have to(it would be easier to) use something like the clj
tool, whereas before something like java -jar /path/to/clojure-1.x.0.jar
used to be sufficient.
I don't think it's true that spec demanded a change to existing intros. spec is almost entirely an ala carte usage and could be totally ignored for intro purposes.
The 3rd ed of Programming Clojure does include a spec chapter though.
destined to be somewhat wrong when spec 2 comes out :)
@alexmiller do you think its worth it to jump onto spec 2 skipping current version?
spec 2 specific boogaloo
no, it's still actively changing
which is why there is no released version
I'll do my usual drive-by comment that we have a branch of our code at work that runs on Spec2 (so our transition will be as painless as possible) 🙂
Elsewhere I believe Alex said they hoped to have it released before Conj (November) but it could be anywhere from "a few" to "six months or so" 🙂
I think it depends on what you're building. If you're just experimenting and learning Clojure and focusing on the clojure.spec
part, then playing with Spec2 so you can compare it to Spec1 and see the shift in thinking is worthwhile.
If you're building product, you probably don't want to bet on Spec2 just yet, unless you're comfortable living on the very bleeding edge (like we do).
But also, if you're not really going deep in clojure.spec
, using Spec1 is fine for now.
the only people that should be actively using spec 2 are people wanting to give bleeding edge feedback while we develop
that's a small group of people, but their feedback has been really helpful and we greatly appreciate it
I think a number of folks who've watched Rich's "Maybe Not" talk would find Spec2 and the evolution of schema
/`select` edifying 🙂
But, yeah, it's still changing a lot and that's to be expected.