Fork me on GitHub
#clojure-nl
<
2020-09-16
>
Stefan08:09:17

Good morning!

Stefan09:09:21

We are planning to use something like spec in our codebase, to get more safety and better understand what everything is supposed to do. Do you have any practical advice? Like: spec vs schema (or both?!)? And best practices, like where to define the spec-related things (near the function, end of file, separate file, …)?

borkdude09:09:48

@stefan.van.den.oord Spec is still alpha. The old spec (spec1) will be replaced with spec2 which is still undergoing changes. See #clojure-spec.

borkdude09:09:10

Schema is fine for simple usage, but right now #malli might be more interesting to use

Mno09:09:22

if you plan on using it both server and clientside Malli gets another +1 from me

Stefan09:09:29

Right, I heard that, but is that a reason to not start using it at this point? It’s working just fine isn’t it?

Stefan09:09:50

I’ll check out malli, hadn’t heard about that before.

borkdude09:09:51

@stefan.van.den.oord It depends if you want to migrate to spec2 later.

Mno09:09:41

also ongoing changes will break things, including maybe a lot of your code, so it depends if you’re willing to risk that pain in the future…

borkdude09:09:31

tl;dr: malli :)

Stefan09:09:38

Ok I’ll also see what I can find about spec2, but given what you know at the moment, do you expect that to replace malli?

borkdude09:09:52

(but malli might also be going through some changes, don't know how stable it is, ask in #malli)

Mno09:09:53

unless you’re using yada? I think they use schema by default

borkdude09:09:07

Yes, we use yada with Schema and that's great

Mno09:09:47

I’m jealous, I hope I find a clojure job soon.

Stefan10:09:04

Yeah I’m hoping for you as well @hobosarefriends. What’s your experience level would you say? (In Clojure specifically and in dev generally)

Stefan10:09:58

(AFK for a while, I’ll check back later)

Mno10:09:10

About 4 years general and 0 professional in Clojure (which is the main problem), all I have to show for my Clojure is some hobby projects that never went anywhere (which is my secondary problem).

Mno10:09:26

Good luck!

gklijs10:09:24

Programming language is not everything, as long as it isn’t Scala 😉

Mno10:09:54

I can’t help but admit I miss some of the IDE powers scala had since I’m writing ruby at the moment, but I wouldn’t go back.

Mno10:09:18

Ruby friendly, it hugs me and tells me everything is gonna be ok.

adrien12:09:44

and you know I’m happy to vouch for you as a reference if it can help 🙂

❤️ 9
Mno12:09:02

Thanks bud!