News for hackers. Stuff that matters.
Re:Free-threaded CPython is ready to experiment with by nine_k on Friday July 12, 2024 @05:25PM (#40949593)
A language server in your IDE kicks in much earlier, and is even more helpful.
Re:Free-threaded CPython is ready to experiment with by zitterbewegung on Friday July 12, 2024 @08:39PM (#40950779)
I haven't used an IDE that has that but it is still just giving you a hint that there is an error and the interpreter is not throwing an error which was my point.
Re:Free-threaded CPython is ready to experiment with by kortex on Friday July 12, 2024 @09:05PM (#40950913)
That's true of most compiled languages. Unless we are talking about asserts, reflection, I think type erasure, and maybe a few other concepts, language runtimes don't check types. C does not check types at runtime. You compile it and then rely on control of invariants and data flow to keep everything on rails. In python, this is tricky because everything is behind at least one layer of indirection, and thus virtually everything is mutable, so it's hard to enforce total control of all data structures. But you can get really close with modern tooling.
Re:Free-threaded CPython is ready to experiment with by cwalv on Friday July 12, 2024 @10:43PM (#40951360)
>> and the interpreter is not throwing an error which was my point. > That's true of most compiled languages

True of most statically typed languages (usually no need to check at runtime), but not true in Python or other dynamically typed languages. Python would have been unusable for decades (prior to typehints) if that was true.

Re:Free-threaded CPython is ready to experiment with by kortex on Saturday July 13, 2024 @12:18PM (#40954912)
That's just reflection. That's a feature of code, not language runtime. I think there are some languages which in fact have type checking in the runtime as a bona-fide feature. Most won't, unless you do something like isinstance()
Re:Free-threaded CPython is ready to experiment with by setopt on Saturday July 13, 2024 @06:41AM (#40953186)
> I haven't used an IDE that has that

You don’t need an IDE for this, an LSP plugin + Pyright is sufficient to get live type checking. For instance, Emacs (Eglot), Vim (ALE), Sublime (SublimeLSP) all support Pyright with nearly no setup required.

Re:Free-threaded CPython is ready to experiment with by zo1 on Saturday July 13, 2024 @12:51PM (#40955155)
> "I haven't used an IDE that has that but it is still just giving you a hint that there is an error and the interpreter is not throwing an error which was my point."

At this point, I'm not sure how one is to take your opinion on this matter. Just like me coding some C# or Java in notepad and then opining to a Java developer audience about the state of their language and ecosystem.