On Mon, Aug 16, 2010 at 16:48, Rasmus Svensson <[email protected]> wrote: > 2010/8/16 Rasmus Svensson <[email protected]>: >>>> 2. multiline comments like java >>>> >>>> /* this is a >>>> multiline comment */ >>> >>> I don't know. >>> >> >> Comment blocks are usually done by starting each line with ;; >> >> ;; this is >> ;; a comment >> ;; block >> (some-code) >> >> Anything after a ; is a comment, like python's #. There is a >> convention for how many ;s to begin the line with. (Basically ; for >> same line comments, ;; for comments above code and ;;; for top-level >> comments not commenting on the form below) >> >> There is also the (comment ...) form that disregards the containing >> forms. Note that the contents has be well-formed clojure code >> (matching parentheses, etc). >> >> (comment ; Usage examples >> (foo 1 2 3) >> (bar :a :b :c)) >> >> // raek >> > > I guess this does not answer the original "why?" question...
Tradition? > Multiline string literals, as showed above, do exist, but do not have > their own syntax. (Also, leading whitespace is not stripped from the > lines.) nor in python. a macro to do that on string literals would be neat. > Clojure follows other traditions for comments than, for example, Java. > Clojure uses Lisp-style comments, which has followed a separate and > parallel path, but also has the #_ "ignore next form" reader macro and > the comment macro I mentioned before. > > // raek > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to [email protected] > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
