Live data from Hacker News

Why I Switched from Python to Clojure (2016)

bradcypert.com

1–10 of 200 posts

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

#4
I have considered multiple times switching from Python to other alternatives. However, I instantly discard any language with a Lisp-like syntax. I just cannot work with it. Being a Haskell hobbyist, I would like Python to be statically type and have better support for pure functional programming, but Python has the libraries that I need.

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

#5
post #4

I have considered multiple times switching from Python to other alternatives. However, I instantly discard any language with a Lisp-like syntax. I just cannot work with it. Being a Haskell hobbyist, I would like Python to be statically type and have better support for pure functional programming, but Python has the libraries that I need.

> I just cannot work with it.

Can't or won't?

I'm not being facetious, here. I just can't imagine any reason one _couldn't_ work with it, once the syntax is learnt. There's nothing about lisp-like syntax that's inherently hard to learn.

Why is lisp special?

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

#6
post #4

I have considered multiple times switching from Python to other alternatives. However, I instantly discard any language with a Lisp-like syntax. I just cannot work with it. Being a Haskell hobbyist, I would like Python to be statically type and have better support for pure functional programming, but Python has the libraries that I need.

Python can be statically typed with mypy and type annotations.

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

#7
post #4

I have considered multiple times switching from Python to other alternatives. However, I instantly discard any language with a Lisp-like syntax. I just cannot work with it. Being a Haskell hobbyist, I would like Python to be statically type and have better support for pure functional programming, but Python has the libraries that I need.

Just think of the parenthesis as loving warm homoiconic hugs.

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

#8

I notice this was written in 2016, but I wonder if the author's opinion has changed since dataclasses have been implemented in Python.

Python's async support also seems to be getting better. There's a flask clone called Quart (http://pgjones.gitlab.io/quart/) and an async postgres client (https://github.com/MagicStack/asyncpg). It works very similar to JavaScript, with async and await keywords. I think it should provide speed and comfort especially if you're a regular JavaScript user.

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

#10
> ...the “implied self parameter” on python methods turned me off.

If I had a nickel for every time I got the "TypeError: random_function() takes 1 positional argument but 2 were given" because I forget the "self" parameter I could buy myself a coffee. Probably a fancy one from the Starbucks even!

Post reply on HN