News for hackers. Stuff that matters.
Re:Python Numbers Every Programmer Should Know by nutjob2 on Thursday January 01, 2026 @02:21PM (#46457108)
> A lot of important and large codebases were grown and maintained in Python

How does this happen? Is it just inertia that cause people to write large systems in a essentially type free, interpreted scripting language?

Re:Python Numbers Every Programmer Should Know by hibikir on Thursday January 01, 2026 @03:05PM (#46457529)
Small startups end up writing code in whatever gets things working faster, because having too large a codebase with too much load is a champagne problem.

If I told you that we were going to be running a very large payments system, with customers from startups to Amazon, you'd not write it in ruby and put the data in MongoDB, and then using its oplog as a queue... but that's what Stripe looked like. They even hired a compiler team to add type checking to the language, as that made far more sense than porting a giant monorepo to something else.

Re:Python Numbers Every Programmer Should Know by xboxnolifes on Thursday January 01, 2026 @02:27PM (#46457177)
It's very simple. Large systems start as small systems.
Re:Python Numbers Every Programmer Should Know by dragonwriter on Thursday January 01, 2026 @04:24PM (#46458164)
Large systems are often aggregates of small systems, too.
Re:Python Numbers Every Programmer Should Know by oivey on Thursday January 01, 2026 @02:30PM (#46457198)
It’s a nice and productive language. Why is that incomprehensible?
Re:Python Numbers Every Programmer Should Know by oofbey on Thursday January 01, 2026 @02:23PM (#46457132)
It’s very natural. Python is fantastic for going from 0 to 1 because it’s easy and forgiving. So lots of projects start with it. Especially anything ML focused. And it’s much harder to change tools once a project is underway.
Re:Python Numbers Every Programmer Should Know by passivegains on Thursday January 01, 2026 @02:57PM (#46457442)
this is absolutely true, but there's an additional nuance: yes, python is fantastic, yes, it's easy and forgiving, but there are other languages like that too. ...except there really aren't. other than ruby and maybe go, every other popular language sacrifices ease of use for things that simply do not matter for the overwhelming majority of programs. much of python's popularity doesn't come from being easy and forgiving, it's that everything else isn't. for normal programming why would we subject ourselves to anything but python unless we had no choice?

while I'm on the soapbox I'll give java a special mention: a couple years ago I'd have said java was easy even though it's tedious and annoying, but I've become reacquainted with it for a high school program (python wouldn't work for what they're doing and the school's comp sci class already uses java.)

this year we're switching to c++.

Re:Python Numbers Every Programmer Should Know by zelphirkalt on Thursday January 01, 2026 @05:48PM (#46459045)
Omg, switching to C++ for pupils programming beginners ... "How to turn off the most students from computer programming?" 101. Really can't get much worse than C++ for beginners.
Re:Python Numbers Every Programmer Should Know by nightfly on Thursday January 01, 2026 @09:31PM (#46460747)
PSU (Oregon) uses C++ as just "c with classes" and ignores the rest of C++ for intro to programming courses. It frustrates people who already use C++ but otherwise works pretty well.
Re:Python Numbers Every Programmer Should Know by Izkata on Friday January 02, 2026 @07:16AM (#46464053)
This was how we learned it in an intro class in highschool ages ago, worked pretty well there too.
Re:Python Numbers Every Programmer Should Know by jgalt212 on Friday January 02, 2026 @07:36AM (#46464163)
C++, The Good Parts
Re:Python Numbers Every Programmer Should Know by tialaramex on Friday January 02, 2026 @09:35AM (#46465137)
We should distinguish "First language" classes (for Computer Scientists who will likely learn many other languages and are expected to graduate knowing enough to just pick up another language with self study in reasonable time) from "Only language" classes for subjects where you might find it useful to write some software. These have different goals, it wouldn't make sense to teach say, OCaml as the only language but it's entirely reasonable as a first language.
Re:Python Numbers Every Programmer Should Know by pjmlp on Friday January 02, 2026 @01:41PM (#46467915)
Back in the 1990's, C++ used to be taught at high school students and first year university students.
Re:Python Numbers Every Programmer Should Know by maccard on Friday January 02, 2026 @09:03PM (#46472034)
I just went and checked my university - they’re still teaching c++ to first year uni students in 2025
Re:Python Numbers Every Programmer Should Know by pjmlp on Friday January 02, 2026 @01:40PM (#46467903)
Cough, Lisp.
Re:Python Numbers Every Programmer Should Know by tjwebbnorfolk on Thursday January 01, 2026 @05:29PM (#46458860)
Most large things begin life as small things.
Re:Python Numbers Every Programmer Should Know by wiseowise on Thursday January 01, 2026 @05:37PM (#46458938)
Python has types, now even gradual static typing if you want to go further. It's irrelevant whether language is interpreted scripting if it solves your problem.
Re:Python Numbers Every Programmer Should Know by IshKebab on Thursday January 01, 2026 @06:43PM (#46459505)
Someone says "let's write a prototype in Python" and someone else says "are you sure we shouldn't use a a better language that is just as productive but isn't going to lock us into abysmal performance down the line?" but everyone else says "nah we don't need to worry about performance yet, and anyway it's just a prototype - we'll write a proper version when we need to"...

10 years later "ok it's too slow; our options are a) spend $10m more on servers, b) spend $5m writing a faster Python runtime before giving up later because nobody uses it, c) spend 2 years rewriting it and probably failing, during which time we can make no new features. a) it is then."

Re:Python Numbers Every Programmer Should Know by gcanyon on Thursday January 01, 2026 @06:49PM (#46459568)
What language is “just as productive but isn't going to lock us into abysmal performance down the line”?

What makes that language not strictly superior to Python?

Re:Python Numbers Every Programmer Should Know by nazgul17 on Thursday January 01, 2026 @09:11PM (#46460608)
Loose typing makes you really fast at writing code, as long as you can keep all the details in your head. Python is great for smaller stuff. But crossed some threshold, the lack of a mechanism that has your back starts slowing you down.
Re:Python Numbers Every Programmer Should Know by gcanyon on Thursday January 01, 2026 @11:00PM (#46461264)
Sure, my language of choice is more flexible than that: I can type

   put "test abc999 this" into x
   add 1 to char 4 to 6 of word 2 of x
   put x -- puts "test abc1000 this"
But I'm still curious -- what's the better language?
Re:Python Numbers Every Programmer Should Know by IshKebab on Friday January 02, 2026 @04:50PM (#46469817)
Typescript, C#, Go, Rust.

I'd say they are almost strictly superior to Python, but there are some minor factors why you might still choose Python over those. E.g. arbitrary precision integers, or the REPL. Go is a bit tedious and Rust is harder to learn (but productive once you have).

But overall they would all be a better choice than Python. Yes even for startups who need to move fast.

Re:Python Numbers Every Programmer Should Know by gcanyon on Saturday January 03, 2026 @06:19PM (#46482831)
I say this out of genuine surprise, not judgment -- I never would have guessed that native Typescript is significantly faster than native Python. To be fair, I don't know if "significantly" is justified. I get that Typescript is typed (heh) and Python is not, but compared to my daily driver language (also not typed) Python is so much faster that I subconsciously think of typing as not being the major performance unlock. But I guess once you optimize the rest, typing is (nearly) the final boss of performance.
Re:Python Numbers Every Programmer Should Know by fud101 on Thursday January 01, 2026 @09:52PM (#46460874)
I don't know a better open source language than Python. Java and C# are both better (platforms) but they come with that obvious corporate catch.
Re:Python Numbers Every Programmer Should Know by pjmlp on Friday January 02, 2026 @01:44PM (#46467944)
You can still get to use Scala, Kotlin, Clojure, F#, all with better performance than Python, and similar prototyping capabilities.
Re:Python Numbers Every Programmer Should Know by fud101 on Friday January 02, 2026 @08:37PM (#46471851)
Those are non-mainstream languages, I think the point stands. You would need to prove the case for Scala or Kotlin tbh, Scala is hideously complex and Kotlin like Python suffers from becoming too bloated, accumulating features and syntax that are either not required or difficult to remember. Clojure and F# are nice and all but very niche.
Re:Python Numbers Every Programmer Should Know by pjmlp on Saturday January 03, 2026 @04:01AM (#46474321)
Python being complex isn't an issue for beginners, apparently.

Kotlin owns the mobile development market with 80% Android market share.

Scala was the AI before Python with Hadoop, Spark and friends.

Lisps might be niche, yet they were Python's flexibility, with machine code compilers, since 1958.

Re:Python Numbers Every Programmer Should Know by rented_mule on Thursday January 01, 2026 @10:11PM (#46461005)
What many startups need to succeed is to be able to pivot/develop/repeat very quickly to find a product+market that makes money. If they don't find that, and most don't, the millions you talk about never come due. They also rarely have enough developers, so developer productivity in the short term is vital to that iteration speed. If that startup turns into Dropbox or Instagram, the millions you mention are round-off error on many billions. Easy business decision, and startups are first and foremost businesses.

Some startups end up in between the two extremes above. I was at one of the Python-based ones that ended up in the middle. At $30M in annual revenue, Python was handling 100M unique monthly visitors on 15 cheap, circa-2010 servers. By the time we hit $1B in annual revenue, we had Spark for both heavy batch computation and streaming computation tasks, and Java for heavy online computational workloads (e.g., online ML inference). There were little bits of Scala, Clojure, Haskell, C++, and Rust here and there (with well over 1K developers, things creep in over the years). 90% of the company's code was still in Python and it worked well. Of course there were pain points, but there always are. At $1B in annual revenue, there was budget for investments to make things better (cleaning up architectural choices that hadn't kept up, adding static types to core things, scaling up tooling around package management and CI, etc.).

But a key to all this... the product that got to $30M (and eventually $1B+) looked nothing like what was pitched to initial investors. It was unlikely that enough things could have been tried to land on the thing that worked without excellent developer productivity early on. Engineering decisions are not only about technical concerns, they are also about the business itself.

Re:Python Numbers Every Programmer Should Know by anhner on Friday January 02, 2026 @04:42AM (#46463145)
If I made an app in python and in 10 years it grows so successful that it needs a $10m vertical scale or $5m rewrite, I wouldn't even complain.