Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

As an author of enforce.py, I just want to say that working on and with type hints exhausted me. The inner implementation is so full of corner cases. And the indifferent at best attitude of python subreddit wasn't very helpful either (imho). I still don't know if anyone besides project's awesome contributors ever used it.

To be honest, the biggest issue of python type hinting (from my point of view) is that it is an abstraction of a totally different typing system underneath. Type hints do not represent actual types at all. They are just for convenience sake.

What started as a proof-of-concept for me, soon became a huge monster with special handlers for almost every single case. It is so messy now, that hardly anyone besides me can do any maintenance. I have been considering a rewrite (using ast modifications to avoid huge number of potential corner cases and performance issues) for more than a year now, but such endeavour is too big for me to undertake. It would be a fresh start after all.

End of rant :)



view as:

Legal | privacy