Live data from Hacker News

Breaking up with Python

cedwards.xyz

121–130 of 179 posts

Re: Breaking up with Python

#121
post #78
post #7

> Python’s standard library sucks Maybe for production ready microservices, but I've always thought Python's std lib was pretty expansive.

And I'm not entirely sure it would be good idea for general purpose language. Knowing the history servers. Which likely will anyway have some critical design or security issue at one and probably many points in their life.

There's the adage that the standard library is where modules go to die, which seems to ring true in Python's case.

Having a big standard library can be great, especially for things and designs that have been settled years ago, but inclusion into the standard library means iterating upon those modules will receive pushback from maintainers looking out for consumers of the standard library who need it to remain stable for potentially decades.

Re: Breaking up with Python

#122
post #39
post #14

The article mentions using JavaScript in place of Python. I use JavaScript a lot for browser stuff but can JavaScript be used for the random command-line scripts that I implement in Python? (Genuine question, not rhetorical.)

Node is an interpreter just like Python, gives access to OS features like sockets, file systems and processes, so yes, you can. However I’d rather not if you value your sanity and want to use typescript, because then you introduce packages and compilers and the whole npm ecosystem which makes building C++ look easy and sane.

It is the first time I see gyp being called easy and sane.

Re: Breaking up with Python

#123
post #104
post #96

Earlier quoted context omitted.

> OK sure, it is slower than compiled languages like C++, that is a concession we make when opting for the ease of readability, writability, usability, etc. Does not being compiled really help with readability? How? After all, one can compile python to machine code, and there are C++ interpreters [1] (I have not heard any claims that using it makes C++ more readable). Then there are very readable/usable languages suc…

You are quite right it is not just compilation that sets Python apart from C++, that was a bit of a simplification on my part. There is also tools such as Cython and numba (JIT) which use various techniques to compile Python code btw. But I am generally in favour of switching to a high performance language or writing in C++ and then importing in Python at that point, personal preference again... Interesting to read a…

> You are quite right it is not just compilation that sets Python apart from C++, that was a bit of a simplification on my part.

That's how I understood your post. Sorry if my post came off as a correction - it was not meant as such, but as a question (not specifically about Python or C++):

How does a language benefit from not having the option to compile it? What restrictions does the requirement to be able to produce a machine-code executable place on it?

Because naively, I would say it should have no effect - one could package the interpreter and source-code into a single file, and think of that as a (very unoptimized) "compiled executable".

Re: Breaking up with Python

#124

What is such low effort post doing here? I use Python way less than I used to, but this is just unfounded whining. And imagining js is better on those points... omfg.

Just for the record, I'm the author and didn't post it to HN specifically because it's opinionated and whiny.

Re: Breaking up with Python

#125

People joke that Python programming is 'pip install solution', but it's honestly not too far from the truth. Until Go, Rust, or whatever fancy new language can match the wealth of well maintained libraries that Python has, I don't see it ever getting replaced for the quick scripting that the author talks about.

Author here. The Go ecosystem is extremely rich. Are you familiar with it? I would say it is at least as rich as Python's, if not more.

Re: Breaking up with Python

#126

What is such low effort post doing here? I use Python way less than I used to, but this is just unfounded whining. And imagining js is better on those points... omfg.

I came here to say the same. The author clearly has only a very superficial knowledge of python (and a large distaste for it).

Throughout my studies and career I've written c, c++, java, javascript, perl, bash, python and a little bit of go. Python for me is by far my favorite and most productive language. Expressive syntax, an unmatched wealth of useful libraries and most importantly: when I come back to code I wrote months ago I can easily read and understand it! Which can't be said of my old perl code.

I also love how python has been picking up steam lately, 3.6 - 3.11 have been splendid releases with plenty of goodies in each one.

Re: Breaking up with Python

#127
post #27

I have gripes with some things in the current state of Python, package management particularly, but choosing JavaScript because Python's standard library is "barebones" doesn't really make any sense to me. I've always found the Python standard library to have tons of useful stuff, and when I'm doing something in JS I often feel like I'm missing my toolbelt or something. Then I install a single npm package to do somet…

Yes, it was bizarre to see: - Python is too big - Python's standard library is too small - therefore, you should use JavaScript It made me wonder if I was hallucinating, so I went and checked... my `node` execurtable is 78MB. Thanks to its robust standard library, my node_modules folder is only 884 MB.

I never said "you should use JavaScript." The post is my own justifications for avoiding Python and I'm not even saying JS beats it on all of these points. The better performance and adequacy of npm/yarn just barely tips the scales in favor of it for me.

Re: Breaking up with Python

#128

I've been recommending Python to the occasional aspirational young programmer. Is it already passé? What would you recommend instead for a starter language? Looking for beginner-friendliness, widespread use, and longevity. edit: to be clear, I hope this won't devolve into a language flamewar. I'm sincerely interested in other devs' opinions, and hoping that either Python is still a good recommendation (which seems to…

Python is syntactically simple but that doesn't necessarily make it a good choice for beginners. I've seen students spend hours wrestling the interpreter over whitespace issues.

Re: Breaking up with Python

#129

I'm getting stuck into Go at the moment and thoroughly enjoying it, but can it really fill the same niche as Python as the article suggests? (Sincere question.) Doesn't the absence of an out-of-the-box REPL hinder quick scripting? As I say, I'm new to Go so would love to hear about people's experience using it in this context.

With `go run` it can be effectively used as a scripting language.

Re: Breaking up with Python

#130
post #62
post #34

Earlier quoted context omitted.

Yeah, that caught me off-guard, too. I agree, though, the urllib module that he links to it's not the best thing ever when it comes to Python, and I say that as a guy who has written Python code for a living for 17 years now. But other than that I find the standard library more than ok. The only thing that I can agree on is the slowness, but even that is relative, as we're not all writing speed-critical code. The typ…

> the urllib module that he links to it's not the best thing ever I think the reason it (and the http modules in general) has never been improved is that even when Python was young, there were better third party packages out there, but no single one of them ever got to the point where the Python devs would consider making it part of the standard library. Particularly when it comes to servers, there have always been m…

There was some reorganization for Python 3:

https://jeremyhylton.blogspot.com/2008/06/

I think there's quite a lot of use of requests that would be fine with 'urllib.request.urlopen(...)'.

Post reply on HN