Hacker News new | ask | show | jobs
by ramses0 236 days ago
Yeah, but the example of "*.retries(...)", in the context of "import some_login_library.Login(...)" is quite powerful! It basically looks like a "super-decorator", and I can definitely see the utility of effectively re-compiling a (third-party) module at runtime to handle something that's more unique to your use case.

Your patch "with retries" might never be accepted, and maintaining any kind of fork(s) or "out-of-tree patches" is not as integrated into the programming environment. Being able to say "assert WrappedLoginLibrary().login(), '...with retries...'" keeps you testable and "in" the language proper.