Live data from Hacker News

Python 3.15: features that didn't make the headlines

blog.changs.co.uk

151–160 of 236 posts

Re: Python 3.15: features that didn't make the headlines

#152
post #59

I was so into Python for 10 years, was enjoyable to work in. But have deleted 100k+ lines this year already moving them to faster languages in a post AI codebot world. Mostly moving to go these days.

I'm still on the lookout for a comprehensive Django-like web framework for go. That would be an instant hit for me.

why not Rails?

Re: Python 3.15: features that didn't make the headlines

#154
post #93

Earlier quoted context omitted.

It's unrelated to the lazy keyword. Instead it's another feature related to error messages. The example: >> 'hello'.toUpperCase() Traceback (most recent call last): ... AttributeError: 'str' object has no attribute 'toUpperCase'. Did you mean '.upper'?

I’ve often thought it would be funny if instead of an error message for stuff like this, a language could be designed to be “typo-insensitive”. If a method or function call is similar enough to an existing one or a common one from other languages, to just have it silently use that.

`npm isntall`

Re: Python 3.15: features that didn't make the headlines

#155

Earlier quoted context omitted.

IMO the main reasons people use Python are: 1. The very first steps are quite simple. Hello world is literally just `print("hello world")`. In other languages it can be a lot more complex. 2. It got a reputation as a beginner-friendly language as a result. 3. It has a "REPL" which means you can type code into a prompt and it will execute it interactively. This is very helpful for research (think AI) where you're tryi…

> * Web sites: Typescript, or maybe Go. lol, no. Just no. Python is far superior for website backends unless perhaps you're running one of the top 20 websites in the world.

function Greeting({ name }: { name: string }) { return ( Hello, {name}!

Welcome to my site.

); }

That looks like HTML, but it's TypeScript. It gets compiled to actual HTML. Can any Python framework do that??

In Python, you'd typically write your logic in Python and your HTML in a separate Jinja2 template file — two languages, two files, context-switching. With Fresh + TSX, your logic and your markup live together in one .tsx file, both in TypeScript, with full type-checking throughout.

Re: Python 3.15: features that didn't make the headlines

#156
post #79

Earlier quoted context omitted.

I’m always baffled when language complaints come down to syntax

That’s exactly how I think, too. But at the same time, I like indentation in Python, because I would logically indent in every other language as well. In fact, I find all those semicolons and similar things at the end of each line completely redundant (why should I repeat myself for something the compiler should do) and I hate them. And that’s despite having experience with Modula and 10 years of C++. But when I look…

fellow ADHD here. Rust feels like 'oh come on you want me to type all that?' I find Raku great, though

Re: Python 3.15: features that didn't make the headlines

#157

Earlier quoted context omitted.

the funny thing is that everyone, including myself, posited that python would be the winner of the ai coding wars, because of how much training data there is for it. My experience has been the opposite.

Typescript wins in terms of training data IMHO, by which I mean that the training data is large enough that AI does great with TS, and the language is (IMHO) superior to Python in many ways. I personally now use a mixture of Typescript and Rust for most things, including AI coding. Its been working quite well. (AI doesn't handle Rust as well as TS, in that the code isn't quite idiomatic, but it does ok)

Upvoted you, because the downvotes from the Python cult are unfair.

Re: Python 3.15: features that didn't make the headlines

#158

Earlier quoted context omitted.

Typescript wins in terms of training data IMHO, by which I mean that the training data is large enough that AI does great with TS, and the language is (IMHO) superior to Python in many ways. I personally now use a mixture of Typescript and Rust for most things, including AI coding. Its been working quite well. (AI doesn't handle Rust as well as TS, in that the code isn't quite idiomatic, but it does ok)

It turns out that volume of training data isn't the most important thing. Elixir beats Kotlin and C#, which beat pretty much everything else. Kotlin is probably the sweet spot for most things.

"sweet spot for most things." care to expand on this a bit? Thanks.

Re: Python 3.15: features that didn't make the headlines

#159
post #24

Earlier quoted context omitted.

I felt the opposite, because Python isn’t a great language. It won because of Google, fast prototyping, and its ML interop (e.g. pandas, numpy), but as a language it’s always been subpar. Indentation is a horrible decision (there’s a reason no other language went this way), which led to simple concepts like blocks/lambdas having pretty wild constraints (only one line??) Type decoration has been a welcome addition, bu…

Lambdas are intentionally kneecapped in python because Guido van Robson doesn't want to make a functional language. (As in "functional programming", not that it doesn't work.)

If he kneecapped an advancement for the language intentionally, then, well, yikes! It's a tautology to say that it isn't bad because the creator said it shouldn't be there. That's not what you want to see from leadership.

Ruby has `do … end` blocks that are readable and greatly improve the language, without turning it into a "functional" language.

Re: Python 3.15: features that didn't make the headlines

#160

I am not a python dev but have the utmost respect for the ecosystem. But damn, with all the supply chain attacks now in the news, could they just make a simple way (for non python insiders) to install python apps without fearing to be infected by a vermin with full access to my $HOME ...

Never install or run a Python project without a "devcontainer" or Docker container or outside a dedicated VM. For the development laptop, a devcontainer is a good answer.
Post reply on HN