16 comments

[ 2.9 ms ] story [ 47.7 ms ] thread
I thought I liked programming, but when I tried to learn other languages, I found out I just like Python.
I've found that I'm very, very biased towards certain tech stacks and against others.

Erlang, UNIX, C, by all means.

Windows, C++, Java, no thanks.

Python is rare in that it's in the middle: it's very useful, and I don't hate it, but neither am I a big fan.

What about lisp, ocaml, haskell, k, q, apl?

I find Python, C, C++ and Java to really be the same, in terms of computational paradigms.

I have very little ML or Lisp experience, and none at all of the others. Interested but haven't pursued them yet.
Python has an absolutely enormous number of high-quality continuously-maintained libraries for it. I think that's the main thing it has going for it, personally. That and it's simpler than Java, C, C++.
I find that Python is broken when it comes to namespaces. C# gets this right, and even PHP's namespace system is better than Python's. But Nonetheless, Python is an incredible language with features such as list comprehension, that no other mainstream language besides C# has.
I’ve recently tried to pickup Go having coded python since 2007.

I find the ideologies behind the language awkward, particularly explicit error object returns, but ultimately I feel upset with what boils down to ‘it’s not python’

Am I destined to hate Go? Some python limitations get to me, namely multiprocessor support and dynamically types fuzziness (typehint sugar is nice but I’d like my compiler to explicitly fail thanks).

Error handling in Go seems obnoxious to me, but I haven't spent any time with the language. You might want to give Elixir a shot: don't bother handling errors at all!

(Ok, that's more than a bit of an exaggeration, but relative to Go there's a lot of truth to it.)

Can you elaborate a bit more on what bothers you about Go? “It’s not Python” could encompass a lot of things.

Personally, I use both languages (as well as Java and C#) and find they do really well for different tasks. If I need a binary command-line tool that I can ship off fairly easily I turn to Go. If I need to quickly parse some text files, bang out a quick HTTP client script, or automate some AWS tasks, I’ll go with Python.

It's been a while since I last touched go. But I remember having a bunch of fun with it when coding up some mathematical challenge problems.

Off hand here's what I remember:

Any two integers can be calculated in python without issue. In C/C++ and golang, you have to check for overflow somehow.

So when python decodes a json, any large integer get parsed correctly and put into memory. With golang and C/C++, those are extra corner cases.

panic() seems to be half-hearted. Kind of like C++'s attempt to use exceptions. Not completely unhelpful, but not a big productivity win. But in either language, the stack has to unwind -- so it feels like they could have used exceptions, and golang errors can be a class with it's own type...

Index out of bounds in arrays panic, in python it's just an IndexError.

Channels block, and trying to work around that is weirdish. It's akin to unix file descriptors, but I can ask unix if the file descriptor would block before I use it. What's wrong with:

    ok, err = ch.send("message", timeout=5)
Non-blocking would just be:

    ok, err = ch.send("message", timeout=0)
I decided not to move to go, in the end. While yes, go would be faster, many of the things I'd use on a day to day basis wouldn't change. Databases, network speed, file/disk access, etc.
Nim has a python-ish feel, though it's definitely not python. The syntax is similar, the semantics are different -- but are very sane. It's much less opinionated than Python or Go, about as fun to write as Python, about as easy to deploy as Go (simple small native executables without dependencies), and about as fast to run and FFI as C++ (if you use the native backends, but it also has JS backend)

Try it, you might like it.

As a JS developer (coming from a C background) I just couldn’t stomach python. For whatever reason, it always rubbed me off the wrong way. Idk if it’s the indentation (I like the ;), the toy-ishness of the language (I don’t feel like I’m actually programming)... meh, but I’m kinda interested in ML and improving my A&DS skills and Python sounds like a well designed language.

Fun fact: JS is a pass by value language... except when it comes to arrays and objects, it then becomes pass by ref. Go figure.

My 25+ year career has been mostly C/C++ and over the past few years started using Python. It constantly blows my mind how much more productive I am with Python vs C/C++ or Javascript. Ideas just seem to flow directly from my mind right into working Python code.

It's great for prototyping and for anything which doesn't require bleeding edge performance.

Even when you require bleeding edge performance, you generally can. Like other languages, knowing where to find tour efficiencies, and the right tools for the job is rather important.
> the toy-ishness of the language

I think that this is a feature, not a bug. Part of my maturation from a junior to a senior engineer was learning to trust that simple implementations are ok. I remember often not trusting that the simple thing would work robustly (passing around a list) and reaching for something way more heavy (perhaps a wrapper around sqlite persistence). I now recognize that the simple implementation is better and almost always more robust than something fancy, and I definitely attribute that to internalizing the zen of python over time.

> JS is a pass by value language... except when it comes to arrays and objects, it then becomes pass by ref. Go figure.

It's all pass by value. For objects and arrays, the value passed is the reference.

Thanks for all the support from my developer communities across GitHub, LinkedIn, HackerNews and Reddit. My repo got placed into the top trending Python repos for today! On Saturday night, my repo had less than 50 stars. As of today, it has 850+ stars

https://github.com/trending/python?since=daily