Recurse is a form of looping, which is why it tends to be written as loop/recur… If map doesn’t modify anything, what’s the point of calling it? To spin CPU cycles? It’s taking the results of the function you give it to call and modifying a sequence under the covers. And by out of your hands I mean that when you write (map f col), your code never directly calls f. You hand it to the Clojure runtime and it runs it when it thinks it should. You don’t control that.
Anyway, a couple parting words before I’m out. This has been a fun discussion but it’s been going in circles for a while now. First, the original question was how to sell Clojure to Python developers to get them to consider switching. To which somebody said the ease of learning is a reason. To which I responded, um, no it’s not. Then everybody flipped their lids, finally settling on “it might not be easy if you’re coming from a strong OO background and a language like Python.” Well, guess what? That’s the demographic we’re talking about.
Aside from that, just in this thread alone, how many people gave their Clojure stories and had it start with “it made no sense, I felt like I couldn’t do anything, until it finally clicked one day.” When I point out that’s a very common initial experience for people of all different experience levels, an experience that other languages don’t tend to have, do people look at that and say, yeah, maybe there needs to be better documentation, tutorials that are kept up to date and actually work, better tooling? No, the response is “You’re only having trouble because you’re brain is tainted with OO residue, you have no idea what you’re doing, and you haven’t memorized a bunch of cryptic functions yet. One you do that, it’ll be simple.” OK…
Giving an unbiased, honest assessment of the hurdles facing wider adoption of the language isn’t crapping on the language. It’s being honest about it, seeing it for what it is, and understanding how the software industry works. Clojure was designed to be a parallel processing language. That’s its strength and where it excels. That’s also a niche market that’s been shrinking thanks to microservices.
I still stand by one of the first answers I gave to the original posted question. The way to get people to switch is not by putting together some PowerPoint slides and discussing it over lunch. There’s nothing on paper that’s going to be compelling enough. You have to just start using it. Don’t ask permission, just do it. If you’re trying to get a friend to switch, start a small project with them that uses it.
So, I’m out. It’s been fun. Keep on keeping on.