3 ms·
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) (in
by afandian 12y ago
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)
- cfontes 12y agoThanks 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
- afandian 12y agoArgument lists are in brackets rather than parens, which helps slightly with the visuals.