capi-workgroup / api-revolution

Proposals for radical or controversial API changes
29 stars 0 forks source link

Concrete types #3

Open encukou opened 11 months ago

encukou commented 11 months ago

New API "layers" (#2, or a "C-API overhaul") should use concrete types, e.g. PyDictObject * rather than PyObject *. Then we get type safety from the compiler, and we don't need type checking at runtime.

In the C-specific API, we'll want:

zooba commented 11 months ago

I'm -1 on this. I think it leads to massive API bloat and restricts our ability to innovate in the future.

I'm not saying our current system of runtime type checking is ideal, it could definitely use an overhaul, but I don't think pushing it into this layer is the right move.