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

I thought you'd say something like that. Have you counted how many brackets though? It's often very close.

    (defn blub-extra [a b]
        (blub (inc a) (inc b))) 
8 parens + 2 brackets

    def blubExtra(a: Int, b: Int): Int {
       blub(inc(a), inc(b))
    }
8 parens + 2 braces

    Integer blubExtra(Integer a, Integer b) {
        return blub(inc(a), inc(b));
    }
8 parens + 2 braces

It's roughly the same numbers of brackets (or equivalent) in Clojure, Scala and Java. They're just in slightly different places.

(excuse syntax I've not written the last two for years)



Thanks for the answer...

I guess my LISP Teacher ruined the syntax for me. Terrible terrible class.

Maybe you are right. I might give it a try again and see if my position still stand :D


Argument lists are in brackets rather than parens, which helps slightly with the visuals.




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

Search: