In grad school, A best friend of mine said he was learning Python and I
checked it out and loved it! Before that I knew a little C, which I
didn't quite get at the point. I then learned TCL, which was the first language I felt practically useful, easy to learn and use.
It's been my hobby language and favorate for many years. My first job
was programming in C#. I still remember how much I hated C# then and
told all my coworkers how awesome Python is :) After many years of using
C# and Visual Studio, I absoluately love it and it changed my mindset a
lot.
Python's been my hobby language until recent years I started to use it
at work, mostly ML/data related stuff. Wrote more lines of Python than I
did in all the previous years... and that gets into the next point -
what I like/dislike about it -
What do you like/dislike about it?
To me the biggest problem is dynamic typing. For large scale project, refactoring huge Python code base is a pain. Code base
discovery/learning usually gets easier if you have a good IDE with
precise autocomplete and goto-definiation. For that, the best
experience I had is C#/VisualStudio, or Java/IntelliJ. For Python, I
tried all, but the best is PyCharm, however, due to its dynamic typing,
even with heavy Python3 type annotations, I still don't feel it's as
reliable and precise as C# or Java. So I have never been confident
refactoring Python code base.
What I love about Python, is its tool chain, and its interpreted
language. virtual env and pip is the best. For a new project, I would:
python3 -m venv .ve
. .ve/bin/activate
pip3 install ...
and off I go.
The fact Python is interpreted, so that you can `eval` a python file as
a way of configuration - this is something I appreciate more and more.
In most cases where you need an "embeded" language into your program,
this comes very handy. Many interpreted languages can do that. But
that's where I found compiled languages are lacking - they can't use
themselves embedded.
To me, Python's `subprocess` module is the best subprocess management
library across all the languages. Especially the `check_output()` really
gets it right, makes it a breeze to call external command or shell capabilities. Whenever I needed subprocess in other languages, I always
wanted to port Python's subprocess APIs to those languages :)
Have you moved on to other languages, or is it still your primary
programming language?
At work yes right now it's my primary language, but I hope it's not:) I
can't say it's my favorate still, but I use it a lot for hobby. I'm
still on the journey looking for "the one", but I feel this journey
won't end :)
so I threw myself into Python 3 (completely avoiding Python 2 at all
costs, as all the references I had available said it was on its way
out and 3 was the future).
Yeah I highly recommend Py3 over Py2, and try use `dataclasses` a lot
and a lot of type annotations:)
--- Synchronet 3.19a-Linux NewsLink 1.113