Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Stylish )))

Name: Anonymous 2012-04-01 23:04

Hello /prog/,
How do you manage your closing parenthesis?

Do you let them hang:                                   
(define (fun1 b)
  (let ((a (fun2 1 2 3)))
    (case
      ((python) (display "FIOC"))
      ((bear) (display "LISP"))
      )
    )
  )


or you tuck them in:                                    
(define (fun1 b)
  (let ((a (fun2 1 2 3)))
    (case
      ((python) (display "FIOC"))
      ((bear) (display "LISP")))))


or, let out a bit at the end of the defun:              

(define (fun1 b)
  (let ((a (fun2 1 2 3)))
    (case
      ((python) (display "FIOC"))
      ((bear) (display "LISP"))))
  )

Name: Anonymous 2012-04-03 13:29

>>18
I should have been more precise; what I actually meant is that the reader shouldn't have to count the number of parens in the clusters that tend to form at the end of lines, he should be able to tell how many lists have been closed by the change of indentation; OTOH, losing the parens that are not at the end of a line would make a lot of statements ambiguous. As to why there is no syntactic sugar nor FIOC (like closing multiple paretheses with ] ), I think it's so that you can better appreciate the power and elegance of the language; you can also more easily make your own compiler/interpreter that way; essentially, and I know CLISP guys are gonna hate me, LISP is a pretty toy language and it should stay that way.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List