News for hackers. Stuff that matters.
Re:Greppability is an underrated code metric by zarzavat on Tuesday September 03, 2024 @04:11AM (#41432509)
That gets to the core of the issue doesn’t it? There are two cultures: Do you prefer to refactor DogView into Dog.View, or do you prefer to refactor Dog.View into DogView.

Personally I value uniqueness/canonicalness over conciseness. I would rather have DogView because then there is one name for the symbol regardless of where I am in the codebase. If the same symbol is used with differently qualified names it is confusing - I want the least qualified name to be more descriptive than “View”.

The other culture is to lean heavily on namespaces and to not worry about uniqueness. In this case you have View and Dog.View that may be used interchangeably in different files. This is the dominant culture in Java and C#.

Re:Greppability is an underrated code metric by kccqzy on Tuesday September 03, 2024 @09:11AM (#41434632)
The second culture that you describe happens also to be how OCaml structures things in modules. It's quite a turnoff for me.