How to ignore / comment out next LFE form?

16 views
Skip to first unread message

mwgkgk

unread,
Oct 8, 2020, 1:39:36 PM10/8/20
to Lisp Flavoured Erlang
Here's #+nil method of commenting out Common Lisp forms discussed at StackOverflow:


I'm looking for a way to discard / comment out, a form. I'm using these commented out forms as temporary shelves for evaluated snippets. What would be a clever way to discard a form without reading?

Clojure has (comment ...) which also addresses this problem, as well as #_( ... ). Is there a cute way to do this without having to define/import "comment" macro in every file?

Thank you and love the website update

Duncan McGreggor

unread,
Oct 8, 2020, 1:48:18 PM10/8/20
to Lisp Flavoured Erlang
I don't think we have form-specific commenting (Robert will know, of course).

LFE does support multi-line comments a la CL, but I understand that's not what you're looking for.

You could define your own macro, and (include-lib ...) it whenever you needed to do this? Pondering naïvly, maybe something like (defmacro /*...) where the entire body was discarded might work?

d


--
You received this message because you are subscribed to the Google Groups "Lisp Flavoured Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lisp-flavoured-e...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lisp-flavoured-erlang/38445022-aef1-4285-9889-96db4471e549n%40googlegroups.com.

Robert Virding

unread,
Oct 8, 2020, 6:36:26 PM10/8/20
to Lisp Flavoured Erlang
No we don't have a (comment ...) form. Now you would have to use a multiline comment #| ... |#  or do as Duncan suggested. Or just comment with ;;

Robert
Reply all
Reply to author
Forward
0 new messages