Hacker News new | ask | show | jobs
by fleetfox 1656 days ago
Do you know if the ORM solution have the same `a` suffix for async interface? I really hope there is more elegant solution for all this.
2 comments

Yes - it's kinda ugly at the moment, having all the `a` prefixed functions - but I think it's intended as a kind of long-term-intermediate step - since the whole of django isn't async at the moment, and needs to have separate versions for everything.

I (wildly) speculate that once the ORM is async too, and all the rest of the bits fall into place (maybe django 5?), maybe django 6 will drop the `a` prefixes and integrate it all back together somehow?

I believe they chose the 'a...' pattern as it matches other apis in the standard library - it also makes it explicit but concise.

I can't see it being dropped any time the future, Django will always have a sync api, that won't be dropped. And there is no way in (current) python to combine a sync and async api into a single method.

ORM will use the same `a` suffix, yes.