I agree that Lazarus looks more mature, however shifting to a pure C backend would actually allow them to be more portable as I believe Lazarus uses FPC which can use a LLVM backend. While LLVM supports most modern platforms, there are lots of less popular architectures that lack LLVM support.
Personally I never liked using any basic derived language for "Real work", but not sure if that was because I was a Delphi guy.
I'm skeptical that targeting C opens up any meaningful additional platform support beyond what FPC natively supports. Even relatively new and/or niche architectures like RISC-V and Xtensa appear to be supported by FPC.
(C code also isn't perfectly portable by any stretch of the imagination, so just having some random C compiler for your platform of choice and some emitted C code doesn't really guarantee that you'll end up with a compatible, working solution.)
I've never used Lazarus or FPC beyond just opening it up and playing with it in years past, but it is interesting how much that ecosystem seems to offer.
[0]: discussed in the first paragraph here: https://www.freepascal.org/
it works.
Which is completely different from assuming that emitted C automatically compiles and runs fine under any C compiler under the sun on any target platform, which seemed to be the implied assumption made by the person I was replying to. I definitely could have misinterpreted.
Regardless, my main point is that FPC already seems to support… pretty much everything, which is impressive. They’ve clearly done a lot of work on portability over the years.
The C standard leaves a lot of UB/implementation specific behavior. Fully “standards-compliant” code that works on one compiler may behave in unexpected ways under another compiler, just due to differences in UB handling. And no, it is not trivial to write UB-free C code. Let’s say you are generating C code from your own programming language. Did you know that an infinite loop that doesn’t do anything might be ignored?[0] This materially changes the behavior of the input program in ways that most people wouldn’t expect. C can quickly go from “infinitely portable assembler for my cool new language” to “major source of confusion.”
That’s before even discussing compiler bugs, which will unintentionally break all assumptions of well-behaved code. Rust has run into (and submitted fixes for) so many LLVM bugs over the years that caused silent miscompilation. Complex software tends to have bugs somewhere, and a lot of compilers are complex.
The less trivial the C code, the more likely you are to run into compatibility problems between compilers. “Hello world” should reliably work everywhere, so that’s something… I guess.
But that’s just like… my opinion. If generating arbitrary C code and shoving it through arbitrary C compilers works reliably for you, then that’s cool?
I personally would want to see a large battery of tests that ensures the program code is likely to be working under each new compiler.
[0]: https://stackoverflow.com/questions/59925618/how-do-i-make-a...
https://github.com/harbour/core#supported-platforms-and-c-co...
The only other project I can think of which remains relatively unknown but still manages to chug along is Tcl (supported by Flightaware and a bunch of other companies iirc).
Yeah, there are a lot of relatively unknown projects that keep going. Pharo (a smalltalk inspired language) is another example of such a thing that I've also never used.
You must be speaking of the demo version.