l
depends
r
Can you please specify when 1 is more preferable?
s
imho the first example is the flashier, “hey look it’s K” approach, which I think has a use in some cases
perhaps not exactly as shown, I’d personally rework it a bit to be a little less constrived
the second is literally just a function call with keyword arguments, you could mistake it for python if you accidentally glossed over the
listOf
call
l
I prefer custom DSL builders mostly in tests but in production code I did not need it
y
DSLs are languages. It mean you have to load a new parser in your head to read it. Unless it read very naturally (aka: Domain Specific), it's harder to understand.
p
I got this: https://imgur.com/a/nEzJ5 (three images in that album) cc @nish
n
I removed the back ticks in the 3rd image because my syntax highlighter doesn’s support those yet. (it’s on my todo though)
👍 1