Live data from Hacker News

Clojure will affect the way you think about programming

eli.thegreenplace.net

71–80 of 226 posts

Re: Clojure will affect the way you think about programming

#71
Clojure also affected the way I think about programming in a very positive way. There are downsides to it

- stack traces - jvm - lein is pretty slow

but the upsides

- immutable data structures - lisp/macros - repl (you can send code from your editor to the repl) - community - great open source web app libraries (for me, anyway)

outweigh the downsides.

I encourage everyone here to try clojure at some point, it might just become your favorite language.

Re: Clojure will affect the way you think about programming

#72
post #32

Earlier quoted context omitted.

One huge difference is the workflow you have in Clojure. REPL driven development is an experience unique to Lisps. When you're working with Clojure, any code can be run in the context of the live app straight from the editor as you write it. This is an amazing experience and very mind expanding in what a development process can look like. Also, anybody who wants to try FP style programming, but isn't interested in st…

Is there something about clj's repl that makes it any different from ghci's?

Yes, you can reload any symbol in the CLJ REPL directly from the editor. You can also evaluate any function within the context of the running application without going through the main. The REPL is an integral part of the development process in Clojure. You can see this in action here around 15 minute mark https://www.youtube.com/watch?v=nItR5rwP4mY

Re: Clojure will affect the way you think about programming

#73
By far the most incredible thing for me was to see how far a few characters of code can go. Clojure is a very tight language where you can accomplish a lot in just one line of code. You end up suddenly having all this new, extra time to just think about your problem instead of coding it.

Re: Clojure will affect the way you think about programming

#74
post #43
post #36

Earlier quoted context omitted.

I personally don't view Scala as a FP language, it's a FP/OO hybrid. It's not opinionated in that regard, and a lot of code in it is written in traditional OO style or a mix of the two. Erlang is another widely used functional language, but it's not very widely used outside the telecom niche. Clojure has the advantage of running on the JVM, and makes it easy to target a much wider range of domains.

right, but technically so is Clojure - you can get your hands dirty and mutable with relative ease. Scala's problem is that they marketed it as "we're almost java - you can just sprinkle some functionalness on your code as you go and you'll be fine".

Clojure is a lot more focused and opinionated. It's unarguably a functional language first and foremost. Note that you can write any style of code in any Turing complete language, the key difference is what style of code the language encourages.

Re: Clojure will affect the way you think about programming

#75
post #32

Earlier quoted context omitted.

One huge difference is the workflow you have in Clojure. REPL driven development is an experience unique to Lisps. When you're working with Clojure, any code can be run in the context of the live app straight from the editor as you write it. This is an amazing experience and very mind expanding in what a development process can look like. Also, anybody who wants to try FP style programming, but isn't interested in st…

Is there something about clj's repl that makes it any different from ghci's?

As an Emacs user, from my experience the Clojure REPL has much better integration with my editor than any non-LISP I've used, which includes Haskell and Erlang. Most of the time I'm not typing commands into the REPL - instead, I'm evaluating code inline, which means I don't need to jump back and forth from the source file to the REPL. It's a much more interactive and productive experience for me, and I haven't been able to fully replicate anywhere else - though it's possible I haven't discovered the right tools for those other languages yet.

I use CIDER with Emacs for Clojure integration: https://github.com/clojure-emacs/cider

Re: Clojure will affect the way you think about programming

#76

I don't like working with clojure. Its basically modern perl. I've worked with both professionally, and the outstanding point with both has been: - programmers try to be clever in their code, write one giant file full of complicated specialized 'beautiful' code, forget everything they know about breaking big tasks into simple small ones. - code is a nightmare to maintain for non-author - non-authors working on code r…

I've been working with Clojure professionally for the past 6 years, and this is completely contrary to my experience.

Clojure is the first language I've used where I'm able to easily read through libraries and understand them.

Clojure uses a small number of common patterns that are applied to solving a wide variety of problems. Most code in the wild that I've seen tends to actually look very similar, and follows common structure.

I've contributed to many Clojure libraries, and many people have contributed to libraries I maintain. My team also maintains Clojure projects that have been in production for years, and we find them much easier to maintain than comparable Java projects we've written previously.

Re: Clojure will affect the way you think about programming

#77

Nothing I've used has the combination of ease of use and interactivity. It's pretty difficult to explain, but one can send both top level forms, or smaller pieces of code to the repl and get results without leaving the code one is working on. https://s3.us-east-2.amazonaws.com/photoblobs/screencast_201...

[deleted]

Re: Clojure will affect the way you think about programming

#78
post #20

Clojure is the language where LISP clicked for me. Can't recommend it enough, it's got all of it - immutable datastructures, convenient data literals, simple and composable concurrency primitives, very thin interface to host VM. Just put enough effort to get beyond that "omg parenthesis" barrier and it will be a delight. It's like that Half-life joke: there are two kinds of people, those that finished Half-life many…

There are many things to love in Clojure, like core.async, the lispyness, etc. But for me, their biggest breakthrough is with no doubt the data-structures. Clojure default of immutable hash maps and vectors was really bold. They had to innovate by giving a twist to Bagwell's great research on data-structures, and they managed to build what in my opinion are the first set of general data-structures suitable of represe…

Do you know of a good resource for reading about their data-structures, especially anything Haskell doesn't have?

Re: Clojure will affect the way you think about programming

#79
post #27

Having spent some time programming in Clojure, for the purpose of expanding my brain, I suspect a better Lisp to start with might be one of the classics - Racket, Common Lisp, etc... One of the reasons I gave up on Clojure was the lack of documentation of libraries, the bad debugging experience (those stack traces!) and the fact that there's no avoiding the JVM. They're all distractions to the learning (that was 2 ye…

Racket especially has a very accessible IDE, thorough documentation, and a few interesting books targeting different audiences. Plus, it's de facto a Scheme, so you can work through SICP with it.

Re: Clojure will affect the way you think about programming

#80
post #18

Earlier quoted context omitted.

The perfect language to expand your brain. In a world dominated by java, php, c++,... In my opinion yes, Clojure could the perfect language to continue learning concepts, at same level would be Haskell.

It's also very pragmatic, and probably most used functional languages in the industry at this point.

> probably most used functional languages in the industry at this point

Perhaps, though unlikely[1] (Haskell seems to have been picking of steam of late).

[1] https://trends.google.com/trends/explore?date=today%205-y&q=...

Post reply on HN