Skip to content

Comment on Examples of Lisp formatting through historyparent

Comments

What you just described totally is banner style. Don't fool yourself! You're just reducing lisp's indent idiocy to something easier to use. Indent I have seen described as "lisp style" (and there are many kinds) can never be called banner-style. Banner style's most important rule is that a new block that should stand out is given one extra indent level, as a whole, except for the header. Lisp style's most important rule is that things that lists of things should have their first element in the header, and the next elements should graphically be right under the first thing, never mind formatting and other things like that. Those concepts are in no way compatible.

Anyways, this:

    while(aa){if(bb){
        xxx}
        yyy}
is not banner-style indent, whereas this:
    while(aa){
        if(bb){
            xxx}
        yyy}
is.

It's a little too long: about 90 lines of code

Not too long for Bitbucket.

This "lisp style indenting" happens in Haskell every now and then too -- luckily all the big projects I looked at use fixed size indent. It's usually a sign of a programmer who hasn't written a lot of code, but I bet someone reading this will find some guy as good as Simon Marlow doing exactly that.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.