What is your coding style? - Programming On Unix

Users browsing this thread: 2 Guest(s)
opfez
Members
When I'm writing C, it's a combination of kernel style (which Emacs is configured to) in addition to putting return values on separate lines.

I don't think there are distinct styles in Lisp, but I put long arguments on separate lines, with the first one sharing the line of the function name, like so:

Code:
(cond ((some-long-predicate-foo a) 3)
      ((another-long-bar b) 4)
      (else 6))

It makes it nice and readable, and fits well with the semantic understanding of Lisp as a tree.


Messages In This Thread
What is your coding style? - by seninha - 25-05-2021, 11:43 AM
RE: What is your coding style? - by venam - 25-05-2021, 12:47 PM
RE: What is your coding style? - by opfez - 25-05-2021, 01:34 PM
RE: What is your coding style? - by jkl - 25-05-2021, 01:41 PM
RE: What is your coding style? - by ckester - 25-05-2021, 02:49 PM
RE: What is your coding style? - by seninha - 25-05-2021, 09:58 PM
RE: What is your coding style? - by s0kx - 26-05-2021, 02:34 AM
RE: What is your coding style? - by venam - 26-05-2021, 09:40 AM
RE: What is your coding style? - by jkl - 26-05-2021, 09:55 AM
RE: What is your coding style? - by opfez - 27-05-2021, 08:27 AM