First post here, so short introduction. Happy FPC&Lazarus user both hobby as professional.
Not sure where to put such question as this, figured might as well drop it here.
Thing that's on my mind for ages is a 'frankenstein' pascal. You know, fancy c operators like ++, replace begin and end block by curlies, and replace the curlies with hashes. But apart those cosmetic tweaks, mostly to increase cross-language readability, very little else. Well, maybe as wish to use 'var' ad-hoc (which has been discussed). It'd just make pascal more similar to 80% of the languages out there. Which i don't really use but i'm lazy.
So, my first approach was to see what macro's and operators could do. That's very limited when it comes to reserved words, or writing an operator or macro for '++' seems not possible at the moment.
So, a wild idea would be to start modifying FP compiler itself. Which is a rabbit hole i'm not sure willing to dive into or have time resources for, though something had to be the occasion one day, but even if so would be sane to check if such endeavor is actually possible; making a mode switch {$FRANKENSTEIN ON} and applying some tweaks to the parser.
Slightly more lazy approach would be to start by dropping it as feature request, somewhere people know about the internals may know, and maybe asking some feedback. It's likely i'm not the first with such suggestion so maybe there's some existing discussion or efforts about such feature that google not easily answered. Any pointers welcome.
Hi there, and thank you for this post. I did laugh after reading the title AND the first
five six replies (thank you, 440bx).
As you have seen, you will not be allowed to touch the compiler. But don't get discouraged, it's easier and more logical to work on a transpiler: from Frankenstein Pascal to ObjFPC Pascal.
Beside the changes you want to include, you need to translate locations between Frankenstein Pascal source code and its counterpart ObjFpc Pascal. Line numbers will probably stay the same, it is the location in each line that will change. This will allow finding the location of, say, errors reported by the compiler in the correct location on your side.
If you do come up with a functional transpiler, ideas that are rejected by core developers could be added to yours. Also, new ideas could be tested on your side first before introducing them to FPC.
Edit:
Just to let you know what you are about to face, read this
whole thread and it does not finish there, read the replies in the bug report mentioned in the first post. There is also a mailing list thread about it, I don't have the link, where the whole thing started.
I don't blame people resisting new ideas, good or bad, but that should not prevent you from giving your idea a try.