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

Clojure is definitely my favorite dynamically typed language. I also think that its community has a world-class aesthetic sense that other languages (looking at you, Haskell) could stand to learn from. Take maps as an example: Clojure has {"one" 1, "five" 5} and Haskell has fromList [("one", 1), ("five", 5)]. Clojure's syntax is a lot more attractive. Clojure has hyphens and Haskell has camelCase. Again, Clojure wins that one. Also, Leiningen is probably the best build tool I've ever used. I also think that Clojure has a great UX sensibility: once you get past That One Thing (parentheses, which are not as bad as they're made out to be) it's more readable than Scala and arguably Haskell. You can also make Clojure blazingly fast for a dynlang, although with some loss of aesthetics due to type hinting and array bashing.

There are two issues with Clojure (3 if you consider static typing a hard requirement, because core.typed is brilliant but probably not "there" yet) and both come from the JVM. The debugging experience is still pretty bad; although I dislike debugging in general if it can be avoided, and that's why I've gravitated toward static typing (catch bugs early). The second is that the JVM itself imposes a ceiling on how well you can do performance-wise, and can require a fair amount of configuration in production. Of course, Clojure may be off the JVM in 10 years and, even if not, it's still a great language in very many ways.



> Leiningen is probably the best build tool I've ever used

Leiningen is like an Apple product: it's well-designed and usually 'just works'. But when something goes wrong you realize it's like a black box with only a mystical stack trace to help you.


Come to #leiningen on freenode. We try to help :)


http://boot-clj.com/ is definitely worth a look -- especially for clojurescript / web development.


Isn't Clojure on CLR too? I would think that platform might suit it a bit better, and might get better performance in the long run (the case I can think of off the bat is the possibility of tail-call-optimization).


It is. In terms of community size it's probably Clojure-jvm, ClojureScript (Clojure compiled down to JavaScript), then Clojure-clr.


> Also, Leiningen is probably the best build tool I've ever used.

Can you elaborate why? Is it also a dependency management tool?


You're saying running on the JVM is a performance issue? Really??


It's an issue with startup time, at least.


are there a lot of applications where this matters? maybe for CLI utils or something?

i mostly make web-apps or data-mining apps, never really understood this criticism of long (1 second type of long, maybe 10 for EE server) startup times for jvm since i can't imagine many apps worth putting a ton of development care into that aren't worth a 1 second wait to run.

i'm not trying to be a smart-ass (i dont believe everything should be blindly forced onto jvm), really just asking why this is such a common concern when in my mind it is an edge-case


It matters quite a bit for CLI utils. More than a tenth of a second is not "instantaneous" - which isn't required, and of course won't always be possible, but starting with substantially more than that isn't great. And of course, if you're using that utility in a loop some pipeline, that could even wind up being a bottleneck.

For any single long-running application that doesn't spawn more processes, of course it doesn't matter - but most performance issues only matter for some set of applications.

I think it's such a common concern because 1) people often start out writing CLI utils as they learn their way around a language, 2) people would love to see Clojure be better for this use case, and 3) it's one of the few things to complain about.


Pixie https://github.com/pixie-lang/pixie looks like it should address that nicely.


It's just another lisp, right? Common lisp already fixes it (or never broke it in the first place):

    > cat test.lisp 
    (prin1 "hello, world")
    
    > time clisp test.lisp 
    "hello, world"
    
    real	0m0.019s
    user	0m0.011s
    sys	0m0.008s
    
    > cat test.clj 
    (print "hello, world\n")
    
    > time clojure test.clj
    hello, world
    
    real	0m0.929s
    user	0m1.283s
    sys	0m0.046s


thanks -- i didnt realize #1 was the case, & good point about the pipeline loop... I guess since I just use the CLI utils in different ecosystems it doesn't really occur to me how they are written, nor do I really care.

But I understand on principle, for example I work on JVM & hate when ppl bring in random code that make it hard to test across the whole system. Seamless integration of all tools & unified protocols are nice.




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

Search: