From "Contributing" ...
We welcome bold ideas and experimental features that push Pascal forward.
I've got a few bold ideas that push Pascal forward. I'm looking forward to see if they are actually welcome. Keep reading...
FPC Unleashed is a home for innovation
Honestly, I don't see any innovation there yet. In my mind, innovation means something "new" and novel. What I see so far are features present in other languages that have been imported into Pascal. I want to make it clear that I value the act of importing useful features from other languages but, I would not characterize them as "innovations" since those are already existing and proven features in other languages. All that said, I have a few bold innovations to suggest. Keep reading...
New language ideas - propose modeswitches, syntax extensions, or compiler enhancements via GitHub Issues or Discussions. Even if you don't have an implementation yet, a well-described idea with use cases is valuable.[/size]
Got plenty of those. I'll mention a few in this post. Keep reading...
Complete, high-quality implementations - we accept pull requests for new language constructs, compiler enhancements, and RTL improvements. We expect production-grade code: clean implementation, proper test coverage, and documentation of the feature.
"production-grade code" is what should always be expected in a compiler. Though I have a very intense dislike of OOP (which is used in FPC and this fork), I _may_ try to get over it to contribute some features that are dear to my heart. Please note the emphasis on the word "_may_".
What we are not looking for
We do not accept minor convenience patches, trivial reformats, or small tweaks that only scratch a personal itch. Every change to a compiler carries weight - if you are contributing code, it should be a meaningful feature or fix that benefits the broader community.
I consider that a problem.
Progress is more often achieved by a long string of small improvements than one or two "revolutionary" features. I'll mention a few of those... keep reading...
With the above comments out of the way, I want to make it clear that I welcome an FPC fork and really hope it will be a bit more active and "sensible" than its root.
I said "keep reading" multiple times above... here is why:
If this branch of FPC is a home for innovation then the entire inline variables needs to be redesigned because as its stands: 1. it definitely lacks innovation (just a poor copy of what's in C) and 2.) it is handicapped in ways that severely limit its usefulness. For those who genuinely want innovation, here is what "inline variables" should be:
It should be a separate block/scope. The reason for this are the following:
1. not only should the programmer be able to declare variables as needed but, the programmer should also be able to declare types and constants as needed. The raison d'etre of inline variables is to have full locality and that applies to constants and types too, not just variables. Inline variables, as implemented in Delphi and the "unleashed" version of FPC are simply a castrated C feature.
2. inline variables (and types and constants) are, by definition specific to a block of code in its own scope. Because of that, the full and correct implementation of the feature must include a mechanism to exit the scope. That's why "exit" and "break" exist, to exit scopes. The scope that contains inline variables (and hopefully types and constants should also be exit-able.)
3. it would keep/force the inline variables/types/constants to be declared at the top of the scope just as it currently is. IOW, inline variables should NOT be allowed to just happen anywhere in a block of code.
As far as "innovation(s)", I'll limit my comments to just that one for the time being.
New language ideas... something really new...
_surprisingly_, a switch/compiler directive that initializes _all_ of the uninitialized locals to binary zeroes (including inline variables), along with an option to select whether the switch is global or local. Such a switch would ensure a _known_ starting state for every variable which could make the detection of a bug much simpler (because there would no longer be uninitialized variables with unpredictable and non-repeatable values.)
Complete, high-quality implementations - I very strongly believe that every feature should have a declared set of owners with a primary owner (and owner history.) Those owners willingly commit to support, maintain, debug and create a complete set of independent, easily identifiable and verifiable test cases for the feature. The owners must be ready and willing to _commit_ whatever time is necessary to fully and correctly implement the feature(s) they own. Otherwise, don't "contribute" because any other "contribution" is just the addition of problems instead of solutions.
proper test coverage... more than once I've looked in the FPC source looking for the tests applied to a particular feature and, sadly, either found nothing or what I found was, putting it very kindly, "incomplete".
As far as,
"we do not accept minor convenience patches, trivial reformats, or small tweaks that only scratch a personal itch.", I agree with the "personal" part. Improvements should benefit the entire community but, that doesn't preclude "trivial reformats", for instance, some identifiers in the FPC source code are in German, it's trivial and _nice_ to have all identifiers in English. A set of formatting standards the source should adhere to might not be a bad idea even though it could be considered to just be a minor convenience (along with the patch or patches that make a few corrections to meet the adopted standard.)
As far as small features/improvements I'd really like to see are:
1. The ability to explicitly initialize more than one variable. Currently only single variable declarations may be initialized.
2. A reasonably logical way of declaring static variables, instead of the ridiculous (not to mention embarrassing) "writable constants".
3. A simple way of aligning records and record fields to a specific boundary. Currently, attempting to align records and/or record fields to a boundary greater than 8 can't be done even sacrificing your first hard drive on George Boole's tomb. (though, TBH, I haven't tried that one yet.)
4. The thousands separator, which is already implemented in FPC but isn't part of the next version because it is a new feature, not just a bug fix.
Lastly and
most importantly:
No matter what features a compiler has, it is totally
worthless if the compiler is bug-ridden. IMO, the first and foremost goal of a compiler should be to be bug-free and after that include/adopt useful features (ideally without introducing new bugs in the process.)
IOW, if new features means more bugs, count me out. I'm already saturated dealing with current FPC bugs.
That's a start. My $0.25 (it would have been $0.05 about 30 days ago.)