4 ms·
That's a cool find. On a practical note, at the top level or in the middle of progn-like constructs, you can do "block comments" with just: '( ... ) I.e., qu
by CyberShadow 5y ago
That's a cool find.
On a practical note, at the top level or in the middle of progn-like constructs, you can do "block comments" with just:
'( ... )
I.e., quote the form to prevent evaluating it.
- fiddlerwoaroof 5y agoI’ve always defined a `comment` macro that expands to nil. It works in most situations but it returns a value
- dan-robertson 5y agoReminds me of comments in MS batch files. I think there is just a program called REM (ie REMark, used to begin comments) which just ignores its arguments and immediately returns.
- agumonkey 5y agoI always hesitate to return the commented expression or nil or '(:comment expr...) Nonetheless comment macros are neat. Just like #_(ignored) in clojure or else.
- NoahTheDuke 5y agoClojure has that built-in and it’s great. Works wonders when testing things too: write a small test in a comment block and you can edit/evaluate a function then move to the comment and see the result immediately.
- fiddlerwoaroof 5y agoYeah, that’s where I got the idea.