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

Doubt it. The problem detailed at the start of the post can be solved by static analysis/linting. And no amount of new strange files will give you the same benefit as using some stock standard static analysis tools.


Please elaborate on what those "some stock standard static analysis tools" are.



I don't think the article talks about unused dependencies anywhere, does it?


Very first complaint is that one can't tell from imports what is being used or not. If you use a linter that removes unused imports then you can tell.


No. The very first complaint is that if you don't know what is being used or not, you cannot tell whether a new "import" will add _another_ cross-module dependency that did not yet exist.

As I already mentioned in another comment, you have:

    .../module1/__init__.py -> import module3
    .../module1/foobar.py -> import module3
    .../module1/baz.py -> import module2
Now you are editing or reviewing a change to foobar.py. How can you tell if depending on module2 is conceptually OK? You need to look at baz.py to prove to yourself that the dependency already exists. Or you need to know a priory that it's an OK thing to do.




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

Search: