4 ms·
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. Liter
by yingw787 8y ago
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.
- iLemming 8y agoAre you implying Clojure is not simple? Have you ever watched Rich Hickey's "Simple made easy" talk? If you haven't, I highly recommend it. Disclaimer: It's not about Clojure.
- yingw787 8y agoI haven’t watched it, but I have heard about it. In contrast to the simplicity of a programming language in the happy path, I’m talking more about simplicity in the case where things break. For example, Python doesn’t implement tail call optimization in part to eliminate stack trace collapses. On the other hand, many reasons my current tool stops working is due to the underlying configuration of the JVM. Configuration management is a leading problem in distributed systems, and a fairly significant one given how it took down both Google and Facebook in two days. Clojure is a lisp on the JVM; I doubt it matters how pretty you write your code if you don’t say allocate enough memory on the heap for the process, and if it implements tail call recursion when that happens you may get an incomplete stack trace. This is more speculation, but I do hope it gives some insights into why you may choose one paradigm for a problem over another. Overall I’d say break your problem domain into subdomains and choose the best paradigm for each.
- iLemming 8y ago> I doubt it matters how pretty you write your code Clojure it's not (just about) beautiful and concise code. There's a lot more to it. And JVM in my experience is not a problem. I was skeptical at first, but as it turned out - JVM is pretty stable and solid piece of tech. Besides - there's also Clojurescript (and less popular Clojure CLR). Depending of what you are trying to solve, you can go that route too. I may not convince you to give Clojure a try, but please do yourself a favor and watch/read Rich Hickey's talks. https://changelog.com/posts/rich-hickeys-greatest-hits https://changelog.com/posts/rich-hickeys-greatest-hits They are perfectly applicable and do make sense even outside of Clojure context. Many developers characterized those talks to be "eye opening".