Normally I do not look at the code of FPC or Lazarus, but today I was looking at some of the units, and it was hard for me to read the codes, especially the FPC. The code seems disturbing. It seems no spacing, format, or even case of keywords is written with a rule.
I wanted to ask how this is managed at the level of such big projects. Do professional developers not care about this stuff, or are these codes old and people have no time to clean them up or something I, as a normal developer, cannot understand?
I've worked with multiple big projects and there is only one unbreakable rule about formatting:
You never change a line just for formatting.If you look at a merge request you want to see what they did, so you look at what they changed. If they formatted 1000 lines and added 2, good luck finding that in the diff. Additionally if two people work on the same file and format it, they will get merge conflicts for the 1000 lines.
Or most importantly, if you want to see why something was changed, you look into the history, if it is full of re-formats it's difficult to find the change that actually caused the behavior
It will happen over time that different code styles get into the code base. FPC is a 30 year old code base that went through many different developers. You have snake casing vs camel casing vs no casing in there. You have descriptive variable names, abbreviations and single char names, you have german and english identifiers. All mixed. Yeah it's a mess, but you cannot clean it up.
Also, readability does not really depend on such superficial metrics. When I first looked into the FPC code base I thought the same thing as you, but once you get used to it, which takes around 30 minutes, it's not an issue anymore. FPC is very well structured semantically and once you get over the superficial inconsistencies it is really easy to read, understand and modify the code. Something I cannot say about most (enterprise) Java or C++ code bases I have worked in