Indent Style - Lisp Style

Lisp Style

A programmer may even go as far as to insert closing brackets in the last line of a block. This style makes indentation the only way of distinguishing blocks of code, but has the advantage of containing no uninformative lines. This could easily be called the Lisp style (because this style is very common in Lisp code) or the Python style (Python has no brackets, but the layout looks very similar, as evidenced by the following two code blocks).

// In C for (i = 0; i < 10; i++) { if (i % 2 == 0) { doSomething (i); } else { doSomethingElse (i); } }

# In Python for i in range(10): if i % 2 == 0: doSomething(i) else: doSomethingElse(i)

;; In Lisp (dotimes (i 10) (if (evenp i) (do-something i) (do-something-else i)))

Read more about this topic:  Indent Style

Famous quotes containing the words lisp and/or style:

    Taught me my alphabet to say,
    To lisp my very earliest word,
    Edgar Allan Poe (1809–1849)

    I concluded that I was skilled, however poorly, at only one thing: marriage. And so I set about the business of selling myself and two children to some unsuspecting man who might think me a desirable second-hand mate, a man of good means and disposition willing to support another man’s children in some semblance of the style to which they were accustomed. My heart was not in the chase, but I was tired and there was no alternative. I could not afford freedom.
    Barbara Howar (b. 1934)