Earlier quoted context omitted.
A lot of Java's verbosity isn't so much from the language, but from when the code was written. It happened to come to popularity at a time when big over-engineered Gang of Four-style design was hot . So you get a lot of code written in this over-engineered fashion where half the classes have names that end in DelegateFactoryFacadeMessengerImpl. Some of it is the language too, but modern Java can definitely be reasona…
Java is still good for several use cases, which were popular at the time, or let's say much more code was needed. Now in the Enterprise world you have much better no- or low-code tools. But in large teams all of these public/private/protected key words are quite nice. Totally unnecessary for a small codebase. But Java with its great runtime, verbose patterns is great for web server applications in large teams. I woul…
Why Python keeps growing, explained
351–360 of 459 posts
Re: Why Python keeps growing, explained
#352Earlier quoted context omitted.
Again, just to make sure I'm being very clear, note what I said in my original comment. I wish that I enjoyed Python. I did not say, and don't assert, that Python is bad or that nobody else should enjoy it. I just wish that I did. > A lot of folks can’t survive today without a giant ide while you advocate not to use something tiny in comparison I'm not advocating anything. I'm stating my personal preferences. But I a…
Belt and suspenders, eh? Not sure how well-known but many 3D scene formats are text, especially early ones. Similar to svg conceptually, which many are familiar with. At a certain complexity, writing it by hand is no longer practical and software support approaches necessity.
It boils down to "the right tool for the job", of course, and like every developer, I choose my tools with an eye toward the goals I want to accomplish. That my goals and yours aren't 100% aligned is to be expected. We're different people. And that also means that at times, a tool that is appropriate for your use case may not be appropriate for mine. And vice versa.
Re: Why Python keeps growing, explained
#353How difficult it would be to transpile python program into a more performant language using a LLM ? This would solve so many issues. Write a code in python and convert it into C++/Rust/Assembly for performance.
It'd be a lot easier (and more reliable) just to use a traditional compiler, rather than an LLM imitating a compiler.
The problem is maintaining the full scope of Python semantics there is usually no advantage to this. Compiling parts of a python codebase, with restricted semantics, can give you significant gains in some use cases, and there are tools (in Python!) that do that already.
Re: Why Python keeps growing, explained
#354Python keeps growing in number of users because it’s easy to get started, has libraries to load basically any data, and to perform any task. It’s frequently the second best language but it’s the second best language for anything. By the time a python programmer has «graduated» to learning a second language, exponential growth has created a bunch of new python programmers, most of which don’t consider themselves progr…
I completely agree - but you say that like it's a bad thing. I work as a developer alongside data scientists, who might have strong knowledge of statistics or machine learning frameworks rather than traditional programming chops. For the most part they don't need to know about concurrency, memory efficiency etc, because they're using a library where those issues have been abstracted away. I think that's what makes py…
In my opinion, this is the part that Go got mostly right. Concurrency is handled by the runtime, and held behind a very thin veil. As a programmer you don't really need to know about it, but it's there when you need to poke at it directly. Exposing channels as a uniform communication mechanism has still enough footguns to be unpleasant, though.
In an ideal world, I should be able to decorate a [python] variable and behind the scenes the runtime would automatically shovel all writes to it through an implicitly created channel. Instead of me as a coder having to think about it. Reads could still go through directly because they are safe.
If I could have Python syntax and stdlib, with Go's net/http and crypto libraries included, and have concurrency handled transparently in Go-style without having to think about it, that would be pretty close to an all-wishes-come-true systems language. Oh, and "go fmt", "go perf" and "go fuzz" as first-class citizens too.
Someone else in this thread brought up the idea of immutable data structures as a default. I wouldn't mind that. Python used to have frozenset (technically it still does but I haven't seen a performance difference for a while), so extending the idea of freeze()/unfreeze() to all data types certainly has appeal.
Re: Why Python keeps growing, explained
#355Earlier quoted context omitted.
I'd say if you do data-intenstive computation with Numpy you are not leaving much on the table due to Python.
I've rewritten real world performance critical numpy code in C and easily gotten 2-5x speedup on several occasions, without having to do anything overly clever on the C side (ie no SIMD or multiprocessing C code for example).
Because if you compare the benefit to the cost of rewrite from py to C and cost of maintaining/updating C code and possible C footguns like manual memory safety, etc - then there is no benefit left
Re: Why Python keeps growing, explained
#356Earlier quoted context omitted.
The antigravity part is probably a reference to https://xkcd.com/353/
> Hello world is just `print "Hello, world!"` SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Hello, world!")?
https://stackoverflow.com/questions/6182964/why-is-parenthes...
Re: Why Python keeps growing, explained
#357Earlier quoted context omitted.
I'd say if you do data-intenstive computation with Numpy you are not leaving much on the table due to Python.
Have gone through the exercise, I know this is false. Not everything can be pushed into numpy, and you can still be left with lots of loops in python.
Re: Why Python keeps growing, explained
#358Earlier quoted context omitted.
Sure thing! Footguns might be the wrong word, and I know as a low level language Rust is insanely safe, but for a high level developer it's type system is gonna mean spending a lot of time in the compiler figuring out type errors, at least initially. That might not be a traditional footgun, but if you're just trying to, I dunno, build a crud api or something, its gonna nuke your development time. Please don't read th…
I find figuring out type errors is usually less work than figuring out the runtime bugs they prevented.
Re: Why Python keeps growing, explained
#359I'm a bit surprised to see this article on GitHub blog, it feels more like something from dev.to - looking at the surface, with little actual insights. Most of the provided reasons behind Python's popularity are true also for other languages - portable, open source, productive, big community. This can be also said about PHP, Ruby, or Perl back in 2000s. Why isn't Perl as popular as Python? I don't think it's all abou…
> Why isn't Perl as popular as Python? I don't think there is a single reason, but it sure didn't help that the community self-destructed by trying to make an entirely new language after version 5 and still call it Perl. It took a lot of years to resolve that nonsense, and in the meantime many people moved on. It also does not help that Perl is a creative language, useful but very much open to many different interpre…
One of the few programming language jokes I've liked enough to repeat is "Python in Perl for people who can't bring themselves to write Perl code"
Re: Why Python keeps growing, explained
#360But even as someone who knows C++, most of the stuff I do doesn't require it - and python is often easier and terser to express the concepts.