This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-19
Channels
- # announcements (7)
- # aws (4)
- # aws-lambda (1)
- # babashka (19)
- # beginners (60)
- # calva (9)
- # chlorine-clover (3)
- # cider (15)
- # clj-kondo (17)
- # clojure (34)
- # clojure-czech (1)
- # clojure-europe (96)
- # clojure-nl (2)
- # clojure-uk (46)
- # clojurescript (20)
- # css (4)
- # cursive (58)
- # data-science (3)
- # datascript (3)
- # datomic (42)
- # depstar (30)
- # dirac (4)
- # emacs (1)
- # etaoin (5)
- # events (1)
- # figwheel-main (30)
- # fulcro (6)
- # helix (9)
- # jobs (1)
- # lumo (3)
- # malli (27)
- # off-topic (15)
- # pathom (11)
- # programming-beginners (6)
- # reitit (6)
- # rewrite-clj (11)
- # shadow-cljs (14)
- # sql (1)
- # tools-deps (18)
- # utah-clojurians (3)
I only use Twitter to follow tech stuff such as library releases (although I also use github watches for that too) and technology content makers, like some interesting blogs
morning
månmån
I love the way you can extend a protocol to an existing datatype and thus add new functionality.
that always seemed a bit underhanded to me
you don't know where you are
things that you used to rely on have been changed underneath your feat
it can upset the principle-of-least-surprise
Right now, I don't have a use-case in my applications (I'm getting along very nicely with multimethods)
I prefer that t'other way round > With great responsibility > comes great power I like to tell myself that when people blame me for things
Protocols are a hacky way to play along with Java Interfaces
all very nefarious
but with an intriguing Type Descriptor, certainly
i.e., fun String.spiderMan() => "Don't you mean with great responsibility comes great power?"
i'm super wary of Protocols personally... but i think the pain i associate with them is as much because they tend to be at a boundary of java interop and the real pain is java, not the protocols themselves
nevertheless i prefer multimethods
I think I recall somewhere a diagram about when to use maps, switch to protocols, records etc...
https://cemerick.com/2011/07/05/flowchart-for-choosing-the-right-clojure-type-definition-form/
Nothing wrong with protocols in my book; open for extension polymorphism is very useful. Extending a protocol to a new type shouldn’t normally break anything as it’s normally an accretiative change. Providing you follow the rules around protocol extension of course, and either own the protocol or the type. The only difficulty with them I’ve ever had with them, is the common one where you’re at a REPL, and you reload the type or the protocol definition; and you find things don’t dispatch properly anymore because you’ve got a stale value using the old type.
Not saying you shouldn’t prefer other things to them though; just that they occupy a useful point in a spectrum of options
who is using Clojure in Glasgow at the moment? I know http://previ.se are
Arnold Clark certainly did use it quite a lot, though I think they may have moved away from it now
there was some thoughtworks stuff at some point i think?
yeah they're doing Student Loans Co IIRC
oooh I've not heard of them
@maleghast isn't too far from glasgow iirc
well thats an interesting one; although he is in the Trossachs, his office is firmly in London (last I heard)
well, noone is really in london just at the moment I suppose