Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I see what you mean. A separator doesn’t work with the concept at all. Apart from that, my reformatting still has two distinct advantages: it does not require a fixed-width typeface, and indentation is not affected by the lengths of identifiers. It’s silly to format code in such a way that you need to re-indent just because you renamed a function.


That's true. I don't like reading it, but I would prefer writing it. It's pretty much why in Haskell I write:

  foo $ bar $ do
    hello
    world
rather than

   foo $ bar $ do hello
                  world
You could easily have:

  foo bar
    mu
be equivalent to

  foo bar
      mu
but if you had

  foo bar bob
        zot
    mu
And you rename foo, you're back to square one again (zot is no longer syntactical). Unless you just have a rule like:

  foobarmuzot bar bob
        zot
      mu
means

  foobarmuzot bar bob
                  zot
               mu
But it seems comparatively difficult to read, and deceptive.


Alexander Burger indents his PicoLisp code more along the lines you describe. Example: http://rosettacode.org/wiki/Execute_Brain****#PicoLisp




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: