News for hackers. Stuff that matters.
Re:GNU Pascal Compiler by bluetomcat on Thursday April 27, 2023 @06:59AM (#35726206)
Python has become the lowest common denominator. It's a practical "no-frills" language that can be picked quickly by a sysadmin, a web developer, a scientist doing number-crunching or a kid automating their homework.
Re:GNU Pascal Compiler by pavlov on Thursday April 27, 2023 @07:17AM (#35726351)
The problem with the “no-frills” proposition is that it’s loaded with frills, complexities, and decades of tech debt. Just installing dependencies for a Python project can feel insurmountable.

IMO JavaScript should be the default for any Python use case. It has the same deceptive veneer of beginner-friendly dynamic behavior, same kinds of footguns; but at least JS has a single package manager, much faster optimized engines, and you’d have to learn it for front-end work anyway so it has long-term dividends.

Re:GNU Pascal Compiler by alex_suzuki on Thursday April 27, 2023 @08:48AM (#35727220)
One of things I really like about Python is the huge standard library. Contrary to JavaScript (which I think is a really weird recommendation), where you need to npm install half the world.
Re:GNU Pascal Compiler by nomdep on Thursday April 27, 2023 @09:13AM (#35727559)
It wouldn’t matter if those dependencies where stable, but JS has a culture of abandon libraries or to make backward-breaking changes every week, so upgrading a project after just a few months is a major pain
Re:GNU Pascal Compiler by DeathArrow on Thursday April 27, 2023 @03:18PM (#35733217)
That's what I learned when I had to do front-end development using Angular: never upgrade packages.
Re:GNU Pascal Compiler by DeathArrow on Thursday April 27, 2023 @03:17PM (#35733193)
And you never know if package Y required by package X will break the security of your app.
Re:GNU Pascal Compiler by BeetleB on Thursday April 27, 2023 @11:08AM (#35729287)
Having used both Python and JS, the only real benefit the latter has it may be faster.

The language has way too many gotchas. I wish they could shed all the legacy aspects to it. My experience with Python, along with many other folks, is that if we don't know something (API, syntax, etc), we often just guess it and it turns out to be right. Fairly intuitive.

Agree with the other commenter: Using pip + venv tends to solve the majority of packaging problems. In my career I deal with a Python dependency headache once every few years.

> and you’d have to learn it for front-end work anyway so it has long-term dividends.

Except when you don't do front-end work ;-)

Re:GNU Pascal Compiler by nephanth on Thursday April 27, 2023 @12:59PM (#35731100)
Poetry does a good job for package management
Re:GNU Pascal Compiler by DeathArrow on Thursday April 27, 2023 @03:14PM (#35733167)
I've learned Javascript and a framework or two and I hate it with passion.

I patiently wait for the moment in which we can manipulate DOM from within Weabassembly. Meanwhile I shamelessly push for Blazor for front-end, wherever I can.

Re:GNU Pascal Compiler by nephanth on Thursday April 27, 2023 @12:57PM (#35731079)
Python is absolutely not a "no-frills" language. It is loaded with features, I'd be willing to bet that 99% of python programmers don't know all language features (even relatively old and frequently used ones like metaclasses) and that virtually nobody knows the whole stdlib
Re:GNU Pascal Compiler by pjmlp on Thursday April 27, 2023 @02:18PM (#35732383)
Additionally if one cares about performance, knowing C or C++ is also a must.
Re:GNU Pascal Compiler by DeathArrow on Thursday April 27, 2023 @03:19PM (#35733232)
When was the last decade someone cared about performance?
Re:GNU Pascal Compiler by pjmlp on Thursday April 27, 2023 @03:23PM (#35733286)
Apparently everyone that writes native libraries to be called from Python, while calling them Python libraries.