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

https://github.com/beansight/beansight-website/blob/master/a...

51 lines for imports and 45 lines for code..

that's all about java..



Well you know these imports are added automatically by your IDE. They probably were not cleaned.

Sincerely, I did a lot of languages, and dependency management in Java is working much better than... say JavaScript :)


In modern PHP frameworks (Zend, Laravel..) there are usually no dependencies at all in classes :)

Thanks to autoloading


That is a lie. There are plenty of dependencies, you just don't know what they are.


It's not that many packages, I'm not sure why they didn't just use import models.* rather than importing 32 classes from that package independently.


Yup. I'm not sure why the .* in imports were always considered a bad practice!


You are right, I don't know, maybe it was a way to clearly see the dependencies.

It may also be due to IDE: a regular way to add package is often: I write my code, IDE is not happy because I did not import Class, I automatically fix the issue, which leads to importing only the required class.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: