4 ms·
A directory structure is too restrictive, much like Java and C++ inheritance. Cluster and search based file access is way more flexible and fluid, but we haven'
by wickedchicken 14y ago
A directory structure is too restrictive, much like Java and C++ inheritance. Cluster and search based file access is way more flexible and fluid, but we haven't had a good UI or overlay onto traditional filesystems yet. Think of Go's interface model, but for files.
Imagine you have a file that is a vendor-provided html template. Does it go in vendor/ or templates/? vendor/templates? What if you want to find out all the templates in use by the system? Document that somewhere and expect a newhire to 'just know' where you store the fragments of your templates?
Sometimes there really isn't a parent-child relationship between data, modeling it like that is always true seems very 1980s.
Perhaps Rob Pike can sum it up better than I can:
"My late friend Alain Fournier once told me that he considered the lowest form of academic work to be taxonomy. And you know what? Type hierarchies are just taxonomy. You need to decide what piece goes in what box, every type's parent, whether A inherits from B or B from A. Is a sortable array an array that sorts or a sorter represented by an array? If you believe that types address all design issues you must make that decision.
I believe that's a preposterous way to think about programming. What matters isn't the ancestor relations between things but what they can do for you."
- super_mario 14y agoAgain, these two are not mutually exclusive. You can store your files in a tree structure, yet unify various nodes by tags or index of concepts. For example, if I store my photos by Year/Year-Month/Day/ and I'm interested in pictures of my son in the last year, it does not mean these pictures have to be all in the same flat one year folder. It is doable today in spotlight $ mdfind -interpret "kind:image name date:>1/1/2012"