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

In "separation of concerns" I'm talking about functionality, not human concerns. See: http://en.wikipedia.org/wiki/Separation_of_concerns

Separation of concerns aims to produce modular, loosely coupled code.

Now, if we start from the point of view that they should be in separate files anyway (in the ruby way, each file should contain one class rather than many - and I don't think it's helpful to change that), then I don't see what difference it makes whether the files are in the same directory or in separate directories.

If you have any sort of decent editor, opening the file you seek should be a matter of pressing a shortcut and typing part of the filename... Certainly, I rarely use the mouse to open files - except when i'm browsing through a new project, but that's a fairly rare use case.

Now, there's another problem I can see with your proposed organisation: although in some cases (even many) applications are built around resource objects, almost every non-trivial application has many edge cases of functionalities that are not directly attached to objects, or are attached to multiple kinds of objects, or are attached to objects but in a way that could be mapped to one object or to another, and is actually best thought of as being linked to something else.

Forcing the file system to be organised around resources like users, projects, items, etc would coerce us into trying to fit functions onto specific objects - and, importantly, it would remove the flexibility of being able to not tie a function to an object.

As such, I think the current model is more flexible and offers something that your proposed model doesn't support and which is useful on most projects.



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

Search: