Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think this is a valid question for this specific case, but may not always be possible. That said, I think as a user I would probably prefer it if under the hood the old function called the new so they can deprecate the behavior without breaking the API. In that way you can still emit the deprecation warning while also only having one actual code path to maintain.




Funny enough, in Python, a sufficiently-dedicated client can also do this on their end by just monkey-patching the class definition.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: