← Back to context

Comment by adsharma

5 hours ago

The position I take is that such obscure code in the guts of a popular package could be slowing down large amounts of deployed code elsewhere. If such code must exist, it should be marked as special (like how Cython does it).

Beyond adding type annotations, there are other important problems to solve when translating python to rust (the most popular path in py2many so far).

  * Translating inheritance -> traits
  * Translating exceptions -> Result<T>
  * Handling incompatible pattern matching

This is why I've urged FastAPI and pydantic maintainers to give up on BaseModel and use fquery.pydantic/fquery.sqlmodel decorators. They translate much better.