File naming convention

hi, i put the uncategorized tag as i didnt find any other suitable tag to be asking questions about the codebase

i noticed that there are files named in lowercase and pascal case and am confused as to the reason behind it

also a bit off topic, but is it mandatory or advised to introduce ourselves in this discourse as a gsoc candidate?

@nots1dd every project has its own conventions. Which conventions is a subjective matter, but the most important aspect is to have consistent conventions.

Some also are like this for historical reasons.

Since right now there is quite some volume of open PRs due to GSoC, let’s not consider renaming any files. This would probably cause a few merge conflicts, and it always makes history/git blame a bit more complicated.

Yes: Contribute to preCICE - Open projects | preCICE - The Coupling Library

There will a separate (short) proposal submission step via the GSoC website. Expect details soon.

Hi @Makis

Since right now there is quite some volume of open PRs due to GSoC, let’s not consider renaming any files

oh definitely, i just asked coz i was curious (i previously thought it was based on which headers were the main entry point for the API and the like but it didnt quite make sense, hence this post), doing such PRs is quite spammy anyway

Yes: …

alright then thanks for the info

In general, there is a convention (at least in C++) that classes (own types) start with an uppercase letter (e.g., Participant) - and the same for the respective filenames, while anything else starts with lowercase (e.g., main.cpp). For library header files, it is common to have them as lowercase, but this is also not a rule (see, e.g., the Eigen library).

As you may see from our repository names and CLI tools, we have a tendency towards lowercase everywhere (unless there are good reasons otherwise): it is simple, predictable, and convenient to type/auto-complete. The fact that preCICE should always be stylized with lower-case pre also makes any CamelCase format a bit… tricky.

But again: these are arbitrary conventions. See some more in the C++ Core Guidelines:

P.S.: It is true that there is no clear place for such questions (as this is also not an “issue”). We sometimes discuss reorganizing the categories here, I will consider this thread in the next iteration.

1 Like

P.S.: It is true that there is no clear place for such questions (as this is also not an “issue”). We sometimes discuss reorganizing the categories here, I will consider this thread in the next iteration.

Yea that would be nice, perhaps a category like devel (that would encourage topics regarding the development of the project) similar to other project discussion forums would suffice, this is just my opinion though

But again: these are arbitrary conventions. See some more in the C++ Core Guidelines

Yep got it, i just wanted to confirm my suspicion and to see if there was a strict guideline that you maintain when naming files thanks for replying

1 Like