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

Am I the only one that finds these deeply nested namespaces completely unusable?

https://github.com/symfony/symfony/blob/master/src/Symfony/B...

I thought the point of autoloading was to make things easier, not to replace require_once with something more verbose. Why should I have to import classes from within my own package?



You're not alone.

It's a symptom of people trying to solve everything with one toolset ("Me know hammer, me use hammer!").

In practice, most OO projects regardless of language have classes like 'LatestThingOtherThingIKindaRememberSomethingSomeoneElseWroteDontTouchIt', combined with a non-negotiable and often intrinsically (looking directly at any given piece of code) inexplicit set of dependency assumptions around the global object model.

In general we need less OO, and more immediately apparent, procedural, loosely coupled code. Programs that "do one thing and do it well".


Just because symfony has fucked naming and use of namespaces doesn't mean namespaces are bad.


I don't find it _completely_ unusable, but I'll admit that it's pretty frustrating.




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: