passy / ama

Ask Me Anything
Artistic License 2.0
33 stars 0 forks source link

python vs coffeescript ? #10

Closed harshasrinivas closed 9 years ago

harshasrinivas commented 9 years ago

:smiley:

passy commented 9 years ago

I'm going to go with the original question: "What do you think about Python?" Because just answering "Python" is kinda boring.

Python will always have a special place in my heart. Before I learned Python I dabbled around in PHP, Perl and oddly enough JavaScript (before people figured out how to do anything real with it). But it wasn't until Python that I actually fell in love with programming. I was able to get shit done in PHP and it was fun to build what I would now call products, but the act of programming was not was I enjoyed.

With Python this changed. Programming could actually be fun, code could be beautiful. It was a game changer for me. It taught me using proper data structures, modularity, threading and even things memory management I was able to ignore while living in a world where the entire lifespan of your application was that of the HTTP request that started it.

I still use Python from time to time, but mainly for two use cases:

  1. For things I'm happy to delete once they've served their purpose. For example, there was a data corruption in an app I use to track my finances. I needed to restore the corrupted elements from a backup I had. That script had one purpose and I didn't need to share it with anyone or extend it later.
  2. For "shell script" kind of tasks (see #9). You find Python on pretty much every system and its "batteries included" strategy works out fairly well for most things.

But even for those small tasks I find it increasingly frustrating to use Python. I like to model my data transformations as pure functions that pipe immutable data through them, but without installing third-party libraries this is incredibly painful in Python.

Then there's the GIL. It feels like Python is still in denial about Moore's Law. PyPy has done amazing things with STM and every now and then there's a new implementation or idea on how to make Python perform better in multi-core environments, but looking back 5 years or so, it seems to be in pretty much the same place.

But the language itself is only one part of the ecosystem. Python has an absolutely amazing community and I wish the tech industry as a whole would take it as an example on how to foster diversity and approach newcomers. The PSF does great work and Guido van Rossum is a brilliant community leader. Watching Jacob Kaplan-Moss's keynote gave me back a bit of hope in our industry.

I don't see myself writing any significant amount of Python code anytime soon again. It doesn't scale well enough for the problems I want to solve both in terms of performance and due to the lack of type safety, but I would still like to think of myself as an extended member of the Python community as a whole.

arthurvr commented 9 years ago

Wow. Again, a super answer, @passy!

harshasrinivas commented 9 years ago

brilliant answer! Thanks! :smile:

passy commented 9 years ago

Thanks, guys! :)

sindresorhus commented 9 years ago

:+1: Python made me fall in love with programming too. Also stumbled in PHP/JS before that.