Live data from Hacker News

Why I Switched from Python to Clojure (2016)

bradcypert.com

101–110 of 200 posts

Re: Why I Switched from Python to Clojure (2016)

#101
post #98
post #40

Earlier quoted context omitted.

"The worst injuries I've ever seen were in big factories with large, powerful tools -- not in home garages where people just use hammers and hand-saws." Powerful abstractions are... powerful. They're more difficult to use correctly, and take longer to learn. The conclusion shouldn't (always) be to avoid them entirely.

I'd wager good money the exact opposite is true. Big factories should be better regulated and more professional leading to less accidents. It's the weekend dad with a beer in his hand trying to get something done quickly that saws through their tendon and fucks up their wrist. Also python is definitely not as simple as a hammer and hand-saw.

Allow me to direct your attention to one of the internet's hidden gems:

https://www.youtube.com/user/USCSB/videos?view=0&sort=p&flow...

Beyond that, these metaphors have gotten too out of hand to have a meaningful conversation :)

Re: Why I Switched from Python to Clojure (2016)

#102
post #43

I can, and do, appreciate opinions on languages themselves. But my decision to continue using Python over Clojure is much less about the language's syntax and more about the available libraries. How do Clojure web frameworks compare to Django/Flask? What would I use instead of Pandas for data analysis? Are there keras-like deep learning tools? Switching languages based on a comparison of idiosyncrasies between the tw…

I'd argue that the JVM is a good move from python. There are a number of rich frame works on the JVM with great tooling. Also if you use PyCharm switching IDEs is easy with Intellij. I switched from python -> F# -> Kotlin. I do agree the language is part of the battle. The other is tooling, and libraries. F#/dotnet was painful as a linux dev. The JVM works on almost any platform with great tooling. For Libraries. I h…

I like writing Kotlin, but I feel like I'm still struggling with the "functional" side it. I think I just like writing java too much.

Re: Why I Switched from Python to Clojure (2016)

#105

Earlier quoted context omitted.

The author switched to kotlin from clojure, kotlin's interop with java is leagues ahead of clojure.

I do not have experience with Kotlin and it's interop with Java. Do you maybe have examples or articles which you'd recommend on the subject?

The official reference: https://kotlinlang.org/docs/reference/java-interop.html

Re: Why I Switched from Python to Clojure (2016)

#106
post #43

I can, and do, appreciate opinions on languages themselves. But my decision to continue using Python over Clojure is much less about the language's syntax and more about the available libraries. How do Clojure web frameworks compare to Django/Flask? What would I use instead of Pandas for data analysis? Are there keras-like deep learning tools? Switching languages based on a comparison of idiosyncrasies between the tw…

rails/Django -> luminous Flask -> pedestal/clojupture Relay -> fulcro Pandas -> clojure.core, specter Keras -> mxnext/neanderthal

The only one I miss in Python that is not in any other package is matplotlib. Is there any clojure alternatives?

Re: Why I Switched from Python to Clojure (2016)

#107
post #103

"Why I Switched from Python to [Shiny Newer Language]" seems to be the thing on HN this week.

I don’t agree that Clojure is a new and shiny thing.

Clojure itself is not a new, shiny thing. What's new and shiny is "I switched from Python to a language that will make me write more LOC."

Re: Why I Switched from Python to Clojure (2016)

#108
post #94

It's interesting that the very things that attracted the author to Clojure was what kept me from moving to it from Python. I enjoyed the syntax. Loved the immutability. However, I wasn't able to understand the structure of program data at a glance even when reading my own code. The reliance on lists and maps everywhere meant that the structure of data was encoded in the code of the functions that created it and somet…

The fundamental problem with S-expressions is that they are intended for (1950s) machine readability and human ergonomics takes a back seat.

Re: Why I Switched from Python to Clojure (2016)

#109
My impression of Python is that it's a Fisher Price Little Tikes coupe with a few GE90 jet turbine hardpoints mounted on it.

It's a very simple language. Literally when things get made to be complex Guido says do it the simple way, because when unbreakable things break it's just that much harder to fix. This makes it very easy to debug, very easy to fix/patch, very easy to onboard new/junior developers in, and very easy to start using in production. It's literally a baby.

But man, you can do some crazy things in Python if you want. You can write C/C++ extensions sure. You can also use things like orchestration with `py4j` and `jpype` in order to execute IPC with a JVM dedicated to the Python process. In that sense all Python in your application becomes a request layer with the JVM or a binary acting as the data layer, and request layers don't require as much in performance because you only need to issue so many requests. Request layers may also need to change faster than data layers/pipelines, and in that Python's great because it's so flexible. Based on some performance testing our team did there's absolutely no reason to simply switch away from Python, though that may also be due to legacy reasons.

I'd like to stick to Python and maintain my Python proficiency going forward (though with Guido out as BFDL we'll have to see how the language evolves). I'd like to maybe add Rust or Elixir to my repertoire and see how they extend my capabilities in ways Python/C/C++ may not. But Python will always be my Swiss Army knife turned combat shovel. It gets the job done.

Re: Why I Switched from Python to Clojure (2016)

#110
post #94

It's interesting that the very things that attracted the author to Clojure was what kept me from moving to it from Python. I enjoyed the syntax. Loved the immutability. However, I wasn't able to understand the structure of program data at a glance even when reading my own code. The reliance on lists and maps everywhere meant that the structure of data was encoded in the code of the functions that created it and somet…

Clojure's answer to that problem and a couple of others is clojure.spec
Post reply on HN