Repository navigation
Replies: 8 comments 9 replies
|
Personally I like camel case, but shouldn't we try to minimize the number of renames. I'm not sure what the state of the art is, but my understanding is that if you rename you lose the history of that file |
|
I like camel case, but kebab-case is fine as well if that is what folks prefer. |
|
I like the camel case. It looks more intuitive because the key class name and file name match. |
|
kebab-case is my personal preference, but it can be a pain with Python if one ever needs to import them. lowerCamelCase + allowing single word file = more than 50% of the files already comply |
|
I also like lowerCamelCase and we already have quite some files following it :-) |
|
I'm a fan of snake_case, but kebab-case does the work just as well, I like to see words separated, I'm just used to the first. |
|
Claude also raised this concern: Case-insensitive filesystems are the biggest risk, and nobody raised it. macOS and Windows treat Resizer.cpp and resizer.cpp as the same file. Any camelCase convention leaves room for collisions that differ only in case. Moving to camelCase would also mean case-only renames like RepairDesign.cc to repairDesign.cc, which git handles badly on those systems. An all-lowercase rule removes this whole class of bugs. |
|
The python concern argues against kebab case (I'd avoid using different conventions by langauge). The case insensitive issue argues against camel case. It seems like snake_case avoid both. The mapping from class name to file name is pretty simple (FooBar -> foo_bar). I would do the renaming one tool per PR in bottom up dependency order. Any further thoughts? |
Uh oh!
There was an error while loading. Please reload this page.
OpenROAD has a mixed of file naming styles for source code. AI summarizes:
I'd like to pick one style and rename (core code, not third party or submodules). My personal preference is kebab-case for the simple ergonomics of being able to type a filename without needing the shift key. I'd like community input before setting a rule and updating.
Notes:
docs/contrib/CodingPractices.md:66 only says "Don't use prefixes on file names. That's what directories are for."
Class_suffix style (e.g. FlexDR_maze.cpp, FlexPA_init.cpp) is a smell of overly large classes.
All reactions