Live data from Hacker News

Python overtakes Java to become the second-most popular programming language

techrepublic.com

181–190 of 357 posts

Re: Python overtakes Java to become the second-most popular programming language

#182

I was a total raving Python evangelist for the first 12 years of my coding career, and then got a job as the CTO for a Python based startup that had been running absent a technical leader for 5 years, with relatively junior coders making all the decisions. I still love Python, but I now have a completely different attitude to hyper-dynamic languages (like Python, Ruby, Clojure, Elixir, etc). In my new opinion, they a…

My experience is that, unless I am getting something extremely powerful with OS-like aspirations (Common Lisp, SmallTalk, Forth), I'd rather have static typing in a professional setting as well.

So a hierarchy of choice for me would be like:

S The languages mentioned above

A Languages with Hindley–Milner type system and inference (SML, OCaml)

B Your typical blue collar languages (C, Pascal, Go, Java, C#)

C Scripting dynamic languages (JS, Perl, PHP, Lua)

Re: Python overtakes Java to become the second-most popular programming language

#183
post #7

The past month I have used Python again after a few years and I have to say I didn't quite like the experience as much as before. On one hand I also used vanilla Python instead of something easier to use like Django but the amount of preventable run-time errors and the lack of IDE autocomplete support at various points was kind of off-putting after coming back from very strictly typed languages like Swift, Kotlin or…

I don't understand why someone would use Python instead of say using Ruby. I think right now it is a matter of "synergy" given that Pandas, Torch and all those libraries are more tailored for Python, but as a scripting language Ruby is just so much easier, elegant and intuitive [ len(something) vs something.length ]

FWIW, I found Python far more intuitive than Ruby. For the most part, Python works like I expect it to, meaning I can write large swaths of functional code without having to look at documentation, something I was never able to do in Ruby.

Re: Python overtakes Java to become the second-most popular programming language

#184
post #112

I was a total raving Python evangelist for the first 12 years of my coding career, and then got a job as the CTO for a Python based startup that had been running absent a technical leader for 5 years, with relatively junior coders making all the decisions. I still love Python, but I now have a completely different attitude to hyper-dynamic languages (like Python, Ruby, Clojure, Elixir, etc). In my new opinion, they a…

This is true for any language, strongly typed or otherwise, with or without memory management. The evidence gathered in the last decades is pretty clear: there is little to no advantage using a strongly typed language over something like Python or Ruby (on mobile so can't look up references but there's really plenty). And that's just looking at bug density, without even considering how quickly you can build something…

But Python is strongly typed. If you say x=2, type(x) will say “int”.

It does suffer from an excessive overloading of operators (“a” times 6 shouldn’t work). But that’s neither here nor there.

If Python wasn’t strongly typed, it wouldn’t be conceptually possible to move it towards explicit typing as the current push is.

Now, it’s not statically typed. You don’t get to assign values and interpretations to memory addresses. This is what “performant” people usually defend. But _that_ has nothing to do with typing assuming semantic roles in codebases.

Re: Python overtakes Java to become the second-most popular programming language

#185
post #79
post #7

The past month I have used Python again after a few years and I have to say I didn't quite like the experience as much as before. On one hand I also used vanilla Python instead of something easier to use like Django but the amount of preventable run-time errors and the lack of IDE autocomplete support at various points was kind of off-putting after coming back from very strictly typed languages like Swift, Kotlin or…

I moved/was pushed over to Python around a year ago, after writing C# for 15 years. My Python setup is as follows: * vscode * pylance * black formatter * flake8 * python typing annotations used as much as possible This seems to work very well with regards to autocomplete and preventing run-time errors. One thing I do miss is proper refactoring support.

> One thing I do miss is proper refactoring support.

You should try PyCharm then. That, and their debugger is orders of magnitudes better than VSCode.

Re: Python overtakes Java to become the second-most popular programming language

#186
post #175

Earlier quoted context omitted.

I actually do due diligence on tech firms now for a job, and you're 100% right that the tradeoffs change dramatically when the company grows. Which doesn't mean that using the best thing possible for your expert coders at the beginning is wrong. At the beginning, you need every advantage you can get, and if you have expert programmers, give them the sharpest knife you can find! But yeah, once your company is hiring h…

Androidifed Java is the worst thing you can deal to be honest.

ok that makes me feel better. God it's awful.

Re: Python overtakes Java to become the second-most popular programming language

#187

I was a total raving Python evangelist for the first 12 years of my coding career, and then got a job as the CTO for a Python based startup that had been running absent a technical leader for 5 years, with relatively junior coders making all the decisions. I still love Python, but I now have a completely different attitude to hyper-dynamic languages (like Python, Ruby, Clojure, Elixir, etc). In my new opinion, they a…

I have found in my own work life that the problems you get from large python code is quite different from a large C code. The python code usually start out very good and readable but as it get extended and changed it tend to create a massive mess that is hard to navigate. The C code in comparison don't generally get extended or changed at all since the initial work to even add the simplest change tend to require a large initial dive into the design, custom types and design details, that such code tend to mostly be left alone.

The upside with the python code is that a complete rewrite of parts that has get extended beyond recognition tend to be easier than expected.

Re: Python overtakes Java to become the second-most popular programming language

#188

Earlier quoted context omitted.

Author of dataclasses here. > (Example - enums are implemented with a metaclass and dataclasses with a class decorator - arguably the latter is the wrong choice, because it is already evident it limits what kind of features can be added to dataclasses). I'm curious about what features can't be added to dataclasses because it's not using a metaclass. If anything, I think that not using a metaclasses is a good thing: i…

I love dataclasses, incredibly simple to use but so useful. My only gripe is no first-class support for "__slots__".

FYI if you haven't heard of it, attrs (https://www.attrs.org/en/stable/) is a package very similar to dataclasses that does support aromatically adding __slots__. I believe dataclasses was bases on it.

Re: Python overtakes Java to become the second-most popular programming language

#189
post #148

Earlier quoted context omitted.

I know what you're getting at, and I agree with the sentiment very often, most of the time even. But in this particular case, I don't think so, and believe me, I spent a lot a of time thinking about that....

So what are your thoughts?

Uh hard. First, maybe don't buy companies with bad technical debt, just start from scratch? And always prefer two experts to 10 juniors in the beginning even if you move more slowly at first. I don't know what would have worked well in that particular situation, but if I were to do it again and could influence the original team, I'd use Clojure. I believe the immutability and control of side effects would have been more of a benefit than types. That was where the real problems came from, dynamic ability to create out-of-sight side effects and alter data in unexpected ways all over the damn place. Clojure's immutability plus spec would have been way better.

Re: Python overtakes Java to become the second-most popular programming language

#190
post #188

Earlier quoted context omitted.

I love dataclasses, incredibly simple to use but so useful. My only gripe is no first-class support for "__slots__".

FYI if you haven't heard of it, attrs ( https://www.attrs.org/en/stable/ ) is a package very similar to dataclasses that does support aromatically adding __slots__. I believe dataclasses was bases on it.

*based. Also @ericvsmith please correct me if I'm wrong - don't remember where I read that.
Post reply on HN