cm0002@lemmy.world to Programmer Humor@programming.dev · 8 hours agoWhen people encounter Lisp syntax for the first timeimagemessage-square23fedilinkarrow-up1189arrow-down12cross-posted to: programmerhumor@lemmy.ml
arrow-up1187arrow-down1imageWhen people encounter Lisp syntax for the first timecm0002@lemmy.world to Programmer Humor@programming.dev · 8 hours agomessage-square23fedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squareRecallMadness@lemmy.nzlinkfedilinkarrow-up9·5 hours agoThreading is a great case for a macro. (-> x (* 2) (/ 3) (- 1)) Is the same as (- (/ (* x 2) 3) 1)
minus-squareMika@piefed.calinkfedilinkEnglisharrow-up3arrow-down1·5 hours agoSure it’s not like it has no uses, but it’s something languages have built-in as syntax sugar or operators, and you rarely need to built your own macro for anything.
minus-squareJerkface (any/all)@lemmy.calinkfedilinkEnglisharrow-up4arrow-down1·4 hours agoHave you ever used a domain specific language? My intuition says, “no.”
minus-squareMika@piefed.calinkfedilinkEnglisharrow-up1·34 minutes agoWhat does it have to do with lisp?
Threading is a great case for a macro.
(-> x (* 2) (/ 3) (- 1))
Is the same as
(- (/ (* x 2) 3) 1)
Sure it’s not like it has no uses, but it’s something languages have built-in as syntax sugar or operators, and you rarely need to built your own macro for anything.
Have you ever used a domain specific language? My intuition says, “no.”
What does it have to do with lisp?