top | item 35510423

(no title)

OliverM | 2 years ago

What are you hoping to gain from learning Clojure?

Have you seen how it’s management of state is different to Python’s in how it allows much closer control of data sharing? That opens up really nice concurrency models, and makes thinking about how data changes over time much more predictable (and powerful).

Does your editor let you manipulate the code as a lisp? The tree-based nature of the code allows for incredible automatic re-organisation of it, on the fly as you need to reshape it.

Have you used transducers yet? They let you specify the essence of a computation and apply it in different contexts - to a series of in-memory values, or values arriving over a network pipe, or any other source, without having to know in advance what that source is

But if these don’t appeal to you or you don’t see the benefits of them then maybe it isn’t for you - which is totally fine. Python can let you express this stuff too, albeit in clunkier ways at times and with a less pleasant refactoring experience. The python repl is also less powerful and not advocated for as a development tool in the same way Clojure’s is.

It really depends on your end-goal. If you’ve not been frustrated by the idioms Python gives you changing languages might feel a little pointless. I’ve used both and I’m far more productive in Clojure. It really rewards study and practice, and grows with you. Python is fine, but it’s a means to an end for me - get in, just get it done, try to remember the irregular syntax, weird build specification, get over white-space layout, use print debugging to get over the repl… it’s not my favourite but it’s perfectly usable.

discuss

order

No comments yet.