News for hackers. Stuff that matters.
Re:Python at Netflix by tombert on Tuesday April 30, 2019 @11:19AM (#19788710)
Is Python the most popular language now? I'm not trying to argue, I'm trying to see how out-of-the-loop I am nowadays.
Re:Python at Netflix by passthejoe on Tuesday April 30, 2019 @11:49AM (#19789006)
I've been resisting Python for years, but it just keeps getting more popular (and support and more/better libraries come along with that), so I might just stop fighting using it for local scripts and small GUI projects.
Re:Python at Netflix by felipellrocha on Tuesday April 30, 2019 @12:06PM (#19789170)
Why would you resist it?
Re:Python at Netflix by zornado on Tuesday April 30, 2019 @12:26PM (#19789365)
It would be nice if the language was typed. Easier for overall maintenance, and refactoring for big projects.
Re:Python at Netflix by prolepunk on Tuesday April 30, 2019 @12:51PM (#19789604)
Type hinting is a standard feature since Python 3.6.

https://docs.python.org/3/library/typing.html

The thing about python, as overall language philosophy, is convention over enforcement.

If you want your team to have a particular style and use certain features, then you should agree to do it and then use automated tools (like pep8, flake) to check that code complies with those rules, but it is up to you how you want to write the code.

Re:Python at Netflix by stuxnet79 on Tuesday April 30, 2019 @12:34PM (#19789446)
Python 3 is typed. Not strongly typed but the point remains. Python is used in a lot of domains and I feel the strides the language has made over the past decade have made it very competitive and a worthy addition to any programmer's toolbox.
Re:Python at Netflix by d0mine on Tuesday April 30, 2019 @03:34PM (#19791131)
Python is strongly typed. It is not statically typed.
Re:Python at Netflix by 52-6F-62 on Tuesday April 30, 2019 @12:33PM (#19789436)
There is a way: http://mypy-lang.org/

I've used Python a fair bit for a variety of semi-permanent or long scripts. I would have liked types more as well. Discovered MyPy after those instances.

Re:Python at Netflix by baq on Tuesday April 30, 2019 @04:38PM (#19791696)
It has a very nice strong typing add on in mypy. Highly recommended for a couple of years now. It’s technically optional but your CI process should take care of that.
Re:Python at Netflix by BeefySwain on Tuesday April 30, 2019 @12:34PM (#19789449)
You should look into type hinting and MyPy
Re:Python at Netflix by tigershark on Tuesday April 30, 2019 @12:01PM (#19789118)
I don’t really think that it’s a good idea for guis.
Re:Python at Netflix by gmanley on Tuesday April 30, 2019 @12:23PM (#19789331)
PyQt is one of the better cross platform GUI libraries for higher level languages. Obviously all the issues that apply to cross platform GUI libraries still apply, though.
Re:Python at Netflix by kickopotomus on Tuesday April 30, 2019 @12:08PM (#19789191)
It has gained a lot of popularity and is used across disciplines pretty heavily. Apart from the typical CS uses, it's used a lot by scientists and engineers because it's pretty easy to pick up and the available resources have snowballed such that someone has probably already solved your problem so all you have to do is import antigravity[0].

[0]: https://xkcd.com/353/

Re:Python at Netflix by wongarsu on Tuesday April 30, 2019 @01:14PM (#19789862)
Python has seen an increase because most ML is done in Python and ML is a popular topic right now.

"most popular" is hard to measure or even define.

Re:Python at Netflix by bouncing on Tuesday April 30, 2019 @11:22AM (#19788734)
Re:Python at Netflix by pbhjpbhj on Tuesday April 30, 2019 @11:28AM (#19788804)
I think it's the popular learner language (UK schools seem to all use it now), which would probably correlate with higher search frequency.
Re:Python at Netflix by bouncing on Tuesday April 30, 2019 @11:38AM (#19788889)
Could be it.

Another measure could be looking at commits on github, but that also has its own biases.

Re:Python at Netflix by yifanl on Tuesday April 30, 2019 @11:21AM (#19788728)
Depends on how you measure most popular. I think I saw a post here saying that the most new questions on SO were for python over js now, which might be a good enough proxy?
Re:Python at Netflix by tombert on Tuesday April 30, 2019 @11:23AM (#19788754)
I suppose Python is so popular in the ML and data-science spaces now that it makes some sense. I don't know a lot about those spaces, and the little bit I've played with neural networks I've done with Clojure because I'm hipster.

Amazing how much of a pure-functional bubble I live in now. I should probably branch out more.

Re:Python at Netflix by adrianhel on Tuesday April 30, 2019 @12:10PM (#19789216)
The university I went to have now switched from Java to Python for introductory computer science. So this type of change may influence this increase in popularity as well.

I remember being a bit baffled that they used Java and not Python as an introductory language. It's a very obvious choice for beginners.

Lol, I remember the first lesson.

    class HelloWorld {
      public static void main(String[] args) {
        System.out.println("Hello, world");
      }
    }
Re:Python at Netflix by istjohn on Tuesday April 30, 2019 @03:31PM (#19791112)
That was the first piece of code I learned, too. It's a small miracle I somehow still managed to fall in love with programming that semester.
Re:Python at Netflix by tombert on Tuesday April 30, 2019 @04:29PM (#19791604)
My first language was C++ (which I hate now), then I learned Haskell, and then I went to college and learned Java, and I remember honestly feeling that the "hello world" that they teach must be somewhat of an "academic version" of things; there's no way anyone would write code that verbose that accomplishes that little.

Now I have a job where I do Java about 30-40% of the time, and I've become horrified to learn that the school version of Java is the easy version. Having to create three different files to set up a database connection never ceases to depress me.

Re:Python at Netflix by newen on Tuesday April 30, 2019 @11:32AM (#19788835)
A lot of universities are teaching using python now.