Arc Forumnew | comments | leaders | submitlogin
2 points by evanrmurphy 5184 days ago | link | parent

One superficial observation: I've noticed you tend not to stack your closing parens. For example, you have:

  (def txt-block (text)
    (flat ; some shorthand features require splicing
      (with (anon? nil ext? nil tag "p" content "")
        (map
          (re-split "\n\n" text)
          txt-html-block
        )
      )
    )
  )
Instead of:

  (def txt-block (text)
    (flat ; some shorthand features require splicing
      (with (anon? nil ext? nil tag "p" content "")
        (map
          (re-split "\n\n" text)
          txt-html-block))))
Of course, you're welcome to format your code however you like. However, you'll notice most people here (and in other lisp communities, I think) would choose the latter. I like it better because it shortens code and most editors make it easy to check who a paren is paired with if you're ever in doubt.

Thanks for sharing your code.



1 point by dpkendal 5182 days ago | link

I've seen the latter style in other people's code, and I do indeed use it for shorter functions with small amounts of indentation. I use BBEdit, which does have a balance option, (Command-B) but I still like to be able to see when something's out of line at a glance with longer functions. I don't mind either style, though.

-----