> There is no other language that places such an emphasis on programming directly with plain and naked data literals.
Counterexamples: Erlang and Elixir. Arguably also Prolog. Also Lua. Many Schemes, and Racket. Of course, REBOL and Red. TCL probably, too.
I can't help but think that people making claims of "no other language has X" are in most cases wrong, and should study a bit more before making them.
There's a lot of hype in the article, I don't want to diminish the value of REPL-based workflows or conciseness[1] of the language, but the overall message that any fresh graduate can become a 10x programmer in under a month... Well, there's at least nothing humble about it, despite the article touting "humility" as a virtue of prospective Clojurists.
[1] Why aren't we all writing in APL/K/J if it matters that much?
I haven’t written any Clojure for a few years now. So my knowledge and technique is out of date, but I have a contrary opinion on “repl driven” development vs many Clojure advocates. In short: your repl compiled code is state that you now have to track in your head.
Yeah, great, you can compile a single function and it hot loads. It’s pretty awesome for experimenting and debug, but the longer your repl session is open and the more you change and compile, the more likely you are going to end up with a mixed state in memory that does not reflect how your program would behave if run from scratch.
You are going to forget to save a change or your manual tinkering with a data structure will leave it inconsistent. These errors accumulate, like navigation error with an IMU.
It’s got use cases for sure, and I miss hot reloading when I’m debugging in other languages, but it is far from being the ultimate feature a language can have.
>Why aren't we all writing in APL/K/J if it matters that much?
In all seriousness I think writing more code in APL would probably cut down on bugs, but array-oriented languages are so far beyond how most programmers think about programming, and look so obscure, that I don't think there's any hope of them seeing widespread adoption. Most people loathe point-free Haskell, so I can only imagine what they'd think of the APL family.
I also thought the bit about fresh graduates having no pride rather blanket. There are plenty of prideful fresh graduates with the kind of pride that experience hasn't yet tempered to produce a humble respect for the fact that you will die knowing next to nothing. Sadly, even some old timers never catch on to that.
> [1] Why aren't we all writing in APL/K/J if it matters that much?
Because most programmers aren't nearly as productive as we could be.
And because "concise" should be measure in the number of tokens needed to achieve certain functionality, not by excessive use of single character tokens.
I think it goes further than the language's support of data literals to the culture of the language itself. The Clojure community takes programing with data literals to, what I would call, a pathological extreme. It's as if nobody wants to write actual code, just data structures to be interpreted, regardless of how general those data structures are. The problem is everybody gets hung up on code is data but doesn't realize that data is not code. At some point that data has to be interpreted, and passing around custom data literals trusting they'll be understood correctly elsewhere in your program turns into its own challenge.
Great article. Even in a large enterprise, where the prevailing organizational ideology centers around building the largest headcount you can for political sway...
I've kept my team small on purpose, and we were able to be very effective by adopting clojure. We have sway because we deliver- and that's a different type of leverage than headcount. We don't get thrown every hot potato, instead we're consistently aligned with the critical portfolios.
A small dedicated team with tools such as clojure will outdeliver, and outcompete a larger team who cannot remain agile and require significant overhead to manage.
This totally makes sense in a startup context, but how does this work in a large enterprise? For instance, who signs off on "critical portfolios" being migrated to clojure, and who maintains these pieces when your team moves onto the next project?
Because Clojure is not terribly fashionable, I imagine the developer pool is much smaller but the candidates are higher quality, mostly due to self-selecting. I really like the sentiment of empowering individual developers to the max.
It's funny, a lot of organizations want to beat the averages whilst engineering in an identical fashion to their competitors. You're not going to consistently get outstanding results if you do the same thing as everyone else.
>You're not going to consistently get outstanding results if you do the same thing as everyone else.
I think the tools matter a lot less than the people using them, and that programmers who perform above replacement level are rarer than is often discussed. I would take a great programmer writing the app in Java to a bad programmer writing the app in Clojure every day of the week.
> You're not going to consistently get outstanding results if you do the same thing as everyone else.
I believe that they understand the premises the same way you do. So they can have 100 average developers or 10 great developers that are three times as effective. If your problem is one that no more than 10 people can work on, you'll take the 10 super experts. If it's not, you'll lose if you choose them because they'll be much slower.
> I imagine the developer pool is much smaller but the candidates are higher quality
People always say this about their favorite niche language and it always feels a little too self serving with little evidence to back it up. Learning languages is relatively simple and enjoyable, especially when the overwhelming majority of those people never end up working on difficult problems in said language. I think it often gives a false sense of superiority as well.
> Most people need some trainings to be able to get into something new. If they have not been taught REPL driven programming, I don't think they can discover it by themselves, despite maybe hearing others talking about it constantly.
Does Emacs count? I don't know Clojure, but I learned elisp for programming emacs and I discovered myself the power of evaluating any part of the code I write on the fly, experimenting with it. It's really useful in practice.
The description here of using the Clojure REPL for development is one of the best I've seen. I think part of the issue is nomenclature -- Read Eval Print Loop applies to lots of systems in lots of languages that many devs are familiar with that are not really what Clojure devs mean when they say "REPL." The actual experience is closer to something like Smalltalk where you alter a running system and experiment with it incrementally.
I guess I need to watch some of the videos he links, because this sounds horrible to me.
I mostly work in Python, which has a repl (though I'm sure not as complete) and sometimes I poke around in it. But if I am working on a real project, or even just a small script, I always want to run it from the beginning on every invocation, because anything short of that is not proof that it works.
"Editing a running system" sounds like a nightmare! How could you ever know things would actually work?!
I don't use Clojure, but I've applied some of its lessons to my work in Julia.
The biggest one is the benefit of using simple, literal datatypes over classes/structs. If a function takes literals, you can just pick it up and run it, and if most of your code uses simple data types, it's more composable by default.
The mini-project I'm working on now has just one custom type, if I had written it 2 years ago it would probably have ten. This has made a big difference in the testability and reusability of my functions.
Pretty interesting topic. I am all for composability. However, I don't necessarily agree with particular benefits of pure data literals. I feel more secure when I wrap even simple types like Strings so that ItemId, UserId is a String but I cannot interchange them.
Similar level of composability with objects and structs can be achieved with generics and traits. I have a code that operates on arrays and matrices however particular implementations depend on the context - it is a DSL embedded into the application. For example I have `lazy matrices` that don't own the matrix or I can have matrices with owned data.
Funny how a lot of "work" on large scale code bases boils down to de-coupling code from the datatypes they never needed to be dependent on (eg, function takes obj but only needs obj.foo)
I'm running my own fairly successful self-funded business, largely thanks to Clojure and ClojureScript, which let me reduce incidental complexity and focus on what matters. So yes, a Clojure developer can do quite a bit alone :-)
> I am not using the REPL much, am I doing something wrong?
Applies to python, too. I am always surprised if developers and data scientists working with python don't know that ipython, and by extension the python Jupiter kernels, come with a repl that hotloads code changes from local installs:
%load_ext autoreload
%autoreload 2
Is usually my first cell in a notebook.
Repls are so powerful. The repl like behavior of flutter is also why our mobile dev likes it so much.
Oh dear lord yes. Autoreload is my saviour in many respects.
I suppose that I come at this from R, where REPL (sortof) driven programming/analysis is a core feature, and until I discovered %autoreload I was feeling very left out in Python.
I guess I sortof understand why it is that way, but it definitely struck me as weird that one wouldn't allow code to be reloaded into a process buffer.
I really enjoy reading anecdotes like the above. Programming languages are how we express intent to systems, and a complex enough domain where quantifying the tradeoffs is sufficiently difficult.
Teams can succeed or fail using any language, but there is a tangible factor somewhere between the language, available libraries and practitioners.
IMHO.....no. If you're already a Java programmer or Android dev. the overlap with Java is a huge win.
However I remember watching a talk that I believe Stuart Halloway gave where he tossed out the statement "if you're not using java.util.Queue to help with concurrency you're doing it wrong." My initial reaction was to think that is brilliant and would solve some of my issues with Clojure, but after that came this feeling of annoyance thinking how the hell was I supposed to know that?! Java rears its ugly head more than Clojure programmers are willing to admit. And even then you don't get the full reach of Java, for example try getting JavaFX and Clojure to play nice together, good luck with that.
Faced with deep diving into the Java world to really get proficient at Clojure or looking elsewhere, personally I looked elsewhere and ended up over at Common Lisp.
It depends on what you mean by "worthing" it. To become a better programmer? Definitely worth it to know Clojure, as it does provide a new programming style that has inspired some other ecosystems. To find a job? Probably not. Clojure is not a popular language.
On the other hand, nowadays you probably can get away with not knowing Java when doing Clojure. There are also Clojures that are not on the JVM. For example, if you do Clojurescript, then you probably need to know some Javascript. There are also natively compiled Clojures for shell scripting, e.g. babashka, etc.
Yes, if you're an application developer that has to build the latest feature to come out of a spin-the-wheel product management meeting. E.g., you're tasked with adding arbitrary custom PDF functionality to your web app. For the majority of tasks, there are Clojure libs but if you need it Java has battle-tested libraries to do all of the tedious (/s) things that keep business-people happy. You can't assume the same for smaller languages/ecosystems.
Depends what you're into. I basically only use Clojure and can't remember the last time I had to know anything about Java. Admittedly I mostly use Clojurescript...
But seriously, I wouldn't worry. You'll have to install Java, and then you won't have to think about Java ever again if you don't want to.
> Clojure is also ideal for a startup, where a couple of competent Clojure programmers can write a complex application that would took a huge team of developers in other languages years of work.
There is a saying "if something sounds too good to be true, it probably is".
I wonder how many other languages did the author try to know that clojure is the reason for his success?
That being said, I really enjoy writing clojure and I absolutely love the interactive style of development. I hope more devs would try it so that it would get more traction in mainstream development.
Author here. I started programming in 80s (yes I am old), so I probably know more languages than people who are younger than me. I also taught programming in universities in my previous life as a professor. Like I said in my article, I won't gave up my corporate research scientist job in my 40s to start a company if I had not known Clojure, knowing that I would be the only one writing code at the beginning.
[+] [-] klibertp|5 years ago|reply
Counterexamples: Erlang and Elixir. Arguably also Prolog. Also Lua. Many Schemes, and Racket. Of course, REBOL and Red. TCL probably, too.
I can't help but think that people making claims of "no other language has X" are in most cases wrong, and should study a bit more before making them.
There's a lot of hype in the article, I don't want to diminish the value of REPL-based workflows or conciseness[1] of the language, but the overall message that any fresh graduate can become a 10x programmer in under a month... Well, there's at least nothing humble about it, despite the article touting "humility" as a virtue of prospective Clojurists.
[1] Why aren't we all writing in APL/K/J if it matters that much?
[+] [-] FPGAhacker|5 years ago|reply
Yeah, great, you can compile a single function and it hot loads. It’s pretty awesome for experimenting and debug, but the longer your repl session is open and the more you change and compile, the more likely you are going to end up with a mixed state in memory that does not reflect how your program would behave if run from scratch.
You are going to forget to save a change or your manual tinkering with a data structure will leave it inconsistent. These errors accumulate, like navigation error with an IMU.
It’s got use cases for sure, and I miss hot reloading when I’m debugging in other languages, but it is far from being the ultimate feature a language can have.
[+] [-] jolux|5 years ago|reply
In all seriousness I think writing more code in APL would probably cut down on bugs, but array-oriented languages are so far beyond how most programmers think about programming, and look so obscure, that I don't think there's any hope of them seeing widespread adoption. Most people loathe point-free Haskell, so I can only imagine what they'd think of the APL family.
[+] [-] bobthechef|5 years ago|reply
[+] [-] jimbokun|5 years ago|reply
Because most programmers aren't nearly as productive as we could be.
And because "concise" should be measure in the number of tokens needed to achieve certain functionality, not by excessive use of single character tokens.
[+] [-] blacktriangle|5 years ago|reply
[+] [-] nojito|5 years ago|reply
[+] [-] datahead|5 years ago|reply
I've kept my team small on purpose, and we were able to be very effective by adopting clojure. We have sway because we deliver- and that's a different type of leverage than headcount. We don't get thrown every hot potato, instead we're consistently aligned with the critical portfolios.
A small dedicated team with tools such as clojure will outdeliver, and outcompete a larger team who cannot remain agile and require significant overhead to manage.
I'm basically rehashing PG's 'Beating the Averages', but it's been my experience as a dev mgr. http://www.paulgraham.com/avg.html
[+] [-] dasil003|5 years ago|reply
[+] [-] mattgreenrocks|5 years ago|reply
It's funny, a lot of organizations want to beat the averages whilst engineering in an identical fashion to their competitors. You're not going to consistently get outstanding results if you do the same thing as everyone else.
[+] [-] jolux|5 years ago|reply
I think the tools matter a lot less than the people using them, and that programmers who perform above replacement level are rarer than is often discussed. I would take a great programmer writing the app in Java to a bad programmer writing the app in Clojure every day of the week.
[+] [-] marktangotango|5 years ago|reply
Bold assertion! I think a lot of orgs would love to be as good as average, joking aside.
[+] [-] luckylion|5 years ago|reply
I believe that they understand the premises the same way you do. So they can have 100 average developers or 10 great developers that are three times as effective. If your problem is one that no more than 10 people can work on, you'll take the 10 super experts. If it's not, you'll lose if you choose them because they'll be much slower.
[+] [-] sdfsfsf3kjdf|5 years ago|reply
People always say this about their favorite niche language and it always feels a little too self serving with little evidence to back it up. Learning languages is relatively simple and enjoyable, especially when the overwhelming majority of those people never end up working on difficult problems in said language. I think it often gives a false sense of superiority as well.
[+] [-] dmortin|5 years ago|reply
Does Emacs count? I don't know Clojure, but I learned elisp for programming emacs and I discovered myself the power of evaluating any part of the code I write on the fly, experimenting with it. It's really useful in practice.
[+] [-] dimitar|5 years ago|reply
[+] [-] jdminhbg|5 years ago|reply
[+] [-] quasarj|5 years ago|reply
I mostly work in Python, which has a repl (though I'm sure not as complete) and sometimes I poke around in it. But if I am working on a real project, or even just a small script, I always want to run it from the beginning on every invocation, because anything short of that is not proof that it works.
"Editing a running system" sounds like a nightmare! How could you ever know things would actually work?!
[+] [-] SatvikBeri|5 years ago|reply
The biggest one is the benefit of using simple, literal datatypes over classes/structs. If a function takes literals, you can just pick it up and run it, and if most of your code uses simple data types, it's more composable by default.
The mini-project I'm working on now has just one custom type, if I had written it 2 years ago it would probably have ten. This has made a big difference in the testability and reusability of my functions.
[+] [-] A-Train|5 years ago|reply
Similar level of composability with objects and structs can be achieved with generics and traits. I have a code that operates on arrays and matrices however particular implementations depend on the context - it is a DSL embedded into the application. For example I have `lazy matrices` that don't own the matrix or I can have matrices with owned data.
[+] [-] darioush|5 years ago|reply
[+] [-] jwr|5 years ago|reply
[+] [-] csbartus|5 years ago|reply
I can't get my head out from the Javascript ecosystem ... and previously I've done PHP ...
Those two made me think to quit programming, but lately I've found new ways like ClojureScript and ReScript.
After 15 years I came to a conclusion: choose a smaller and better language vs a popular one with a huge ecosystem.
[+] [-] prennert|5 years ago|reply
Applies to python, too. I am always surprised if developers and data scientists working with python don't know that ipython, and by extension the python Jupiter kernels, come with a repl that hotloads code changes from local installs:
%load_ext autoreload
%autoreload 2
Is usually my first cell in a notebook.
Repls are so powerful. The repl like behavior of flutter is also why our mobile dev likes it so much.
[+] [-] devoutsalsa|5 years ago|reply
[+] [-] disgruntledphd2|5 years ago|reply
I suppose that I come at this from R, where REPL (sortof) driven programming/analysis is a core feature, and until I discovered %autoreload I was feeling very left out in Python.
I guess I sortof understand why it is that way, but it definitely struck me as weird that one wouldn't allow code to be reloaded into a process buffer.
[+] [-] Tcepsa|5 years ago|reply
[+] [-] sharms|5 years ago|reply
Teams can succeed or fail using any language, but there is a tangible factor somewhere between the language, available libraries and practitioners.
[+] [-] bionhoward|5 years ago|reply
[+] [-] blacktriangle|5 years ago|reply
However I remember watching a talk that I believe Stuart Halloway gave where he tossed out the statement "if you're not using java.util.Queue to help with concurrency you're doing it wrong." My initial reaction was to think that is brilliant and would solve some of my issues with Clojure, but after that came this feeling of annoyance thinking how the hell was I supposed to know that?! Java rears its ugly head more than Clojure programmers are willing to admit. And even then you don't get the full reach of Java, for example try getting JavaFX and Clojure to play nice together, good luck with that.
Faced with deep diving into the Java world to really get proficient at Clojure or looking elsewhere, personally I looked elsewhere and ended up over at Common Lisp.
[+] [-] huahaiy|5 years ago|reply
On the other hand, nowadays you probably can get away with not knowing Java when doing Clojure. There are also Clojures that are not on the JVM. For example, if you do Clojurescript, then you probably need to know some Javascript. There are also natively compiled Clojures for shell scripting, e.g. babashka, etc.
[+] [-] peppery-idiot|5 years ago|reply
[+] [-] roninhacker|5 years ago|reply
But seriously, I wouldn't worry. You'll have to install Java, and then you won't have to think about Java ever again if you don't want to.
[+] [-] unknown|5 years ago|reply
[deleted]
[+] [-] MrPatan|5 years ago|reply
[+] [-] niceairport|5 years ago|reply
[+] [-] lukashrb|5 years ago|reply
There is a saying "if something sounds too good to be true, it probably is".
I wonder how many other languages did the author try to know that clojure is the reason for his success?
That being said, I really enjoy writing clojure and I absolutely love the interactive style of development. I hope more devs would try it so that it would get more traction in mainstream development.
[+] [-] huahaiy|5 years ago|reply
[+] [-] niels_bom|5 years ago|reply
[+] [-] mustermannBB|5 years ago|reply
https://youtu.be/C-kF25fWTO8?t=1039
[+] [-] rjakobsson|5 years ago|reply