On 25/11/20 11:48 am, Steven D'Aprano wrote:
In a language without declarations, how do you know that something is unused?
Personally, I don't mind if I have to *tell* it what I'm using. I don't insist on the stripping-out being automatic, and I would actually prefer it not to be.
To support that, I want a system that lets me specify exactly what I'm using, during development *and* packaging, both working off the same information. That way I can be sure that if it runs for me, it will also run for my users.
# Module eggs from spam import bunchofstuff re = bunchofstuff['re']
I trust you're not going to say that if you write obfuscated code like that, you deserve whatever pain you get :-)
With the scheme described above, I'll find out during testing if I've forgotten to add re as a dependency. And if I don't, then it's my fault for not testing thoroughly enough.