Earlier quoted context omitted.
I think the purpose of go is to write CRUD. Stray from that and you're on your own.
crud is a pretty poor fit for go, you're better served by languages like python that can autogenerate classes that reflect the db schema. go's sweet spot is things like network servers.
Python 3.15: features that didn't make the headlines
141–150 of 236 posts
Re: Python 3.15: features that didn't make the headlines
#142Re: Python 3.15: features that didn't make the headlines
#143Earlier quoted context omitted.
Also C++/Java static initialization, C# static constructors, or Rust global variable initialization, ... Most languages have this feature Afaik
Rust doesn't have this behavior (sometimes called "life before main"). Code to initialize a static variable runs either at compile time, or lazily on first access, depending on which mechanism you use.
Re: Python 3.15: features that didn't make the headlines
#144> I've left this one to the bonus section because I've never used set operations on Counters and I'm finding it extremely hard to think of a use case for xor specifically. But I do appreciate the devs adding it for completeness. Check out symmetric difference https://en.wikipedia.org/wiki/Symmetric_difference
Yeah, but applied to counters it would be the symmetric difference between multisets, which doesn't have a natural definition. If I understood the proposal they'd be defining it as absolute value of the difference of the counts, which isn't even associative. If they only considered parities it could be interpreted as addition in F_2, which is more natural, but I'd still agree that it's hard to see how you'd use somet…
Re: Python 3.15: features that didn't make the headlines
#145I still have a special place in my heart for the language and think it’s still got a niche.
Re: Python 3.15: features that didn't make the headlines
#146Earlier 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.
You can generate the HTML server-side using TSX. 100x better than anything Python offers.
Re: Python 3.15: features that didn't make the headlines
#147Earlier quoted context omitted.
I think this is just a natural consequence of an easy-to-use package system. The exact same story as with node. If you don't want lots of imports, don't make it so damn easy to pile them into projects. I'm frankly surprised we still see so few supply chain attacks, even though they picked up their cadence dramatically.
IIUC the organizations that most strongly pushed for this feature are big companies with large codebases. These tend not to be the kinds of orgs that just casually pull in dependencies from PyPI on a whim; I think it more likely that the quantity of first-party code was so large that importing all of it on startup was causing problems.
We would also constantly need to put imports in function heads to effectively lazy import due to the massive risk of circular imports. We also had dynamic imports so tracking the cycles was very difficult at times.
Re: Python 3.15: features that didn't make the headlines
#148Earlier quoted context omitted.
I'm still on the lookout for a comprehensive Django-like web framework for go. That would be an instant hit for me.
Try another language? The Go ecosystem tends towards libraries as opposed to "frameworks." I personally chose C# for this reason, because ASP.NET is mature and (IMO) well designed. But there's also Java/Spring and and lots of other options in different languages depending on your preferences.
Re: Python 3.15: features that didn't make the headlines
#149Earlier quoted context omitted.
I'm still on the lookout for a comprehensive Django-like web framework for go. That would be an instant hit for me.
Same here. Django is my last holdout for Python. Everything new is go.
Just let me build a CRUD app, on the server, that spits out HTML without an excessive swamp of unmaintained nonsense and a cultish abhorrence of simplicity.
Re: Python 3.15: features that didn't make the headlines
#150Earlier quoted context omitted.
I think "Python is slow" is reductive and frankly just as useful as saying "Python begins with a 'P'". The story is more complicated than simply speed of execution. Choosing a language is a game of trade-offs: potentially slower execution in return for faster development time, for example. If your team is already familiar with Ruby, will asking them to write a project in Rust necessarily result in a better product? M…
> potentially slower execution in return for faster development time, for example. Another classic lie about Python. The slower speed doesn't matter because it's development speed that's important, and Python gives you faster development speed! Except... it absolutely doesn't. It would be very difficult to argue that Typescript has significantly slower development speed but it is much faster to execute. I also disagr…
At risk of nebulous repetition: There are many reasons one might choose a particular language. If you or your team find TypeScript or Go more amenable, by all means, use them.