[fpc-other] (Linux to pascal continued from fpc-pascal)

Marco van de Voort marcov at stack.nl
Sat Dec 6 11:55:33 CET 2008


In our previous episode, Guillermo Mart<ED>nez Jim<E9>nez said:
> > I think the problem here (again) is not the language, it's the critical
> > mass of users of the language. Using C for Linux was a good bet, not
> > because the language is good (Pascal is way better for me), but because
> > C has a wider user base who can fix/add features.
>
> I disagree.  C is better for write operating systems *by definition*:
> C was created to write UNIX, Pascal was created to learn good
> programming techniques.  C is low/mid-level language, Pascal is
> high-level (and Object Pascal is even higher):  OS are the lowest
> software level.

I don't see that at all. Sure original Pascal started and ended a bit higher
(no lowlevel manipulation). But this is a Free Pascal list, and Free Pascal
and Delphi can get down and dirty too.

There sure isn't much in C that the FPC dialect can not do, or is still
relevant. (C constructs directly mapping to PDP assembler constructions
aren't that useful anymore) 

And the few bits that miss (if any) would probably be added soon when major
OS development would start.  I think it is more a matter of FPC being geared
towards apps development as a compiler than a matter of language, and that
most of the modifications would be in that space, and in the internal
assembler.

One could notice FPC lacking in those things  already a bit when trying to
port the si_* startup constructs to other platforms. Stuff like weak
referencing is hard to do.

> I'm not saying it's impossible:  here you have MacOS and Toro. I'm
> just saying that _I think_ it isn't the best option.  Of course a
> better option is to write the kernel in C and Assembler and the
> utilities in Pascal and Object Pascal.

Well, it is a pity that there is so much routine discussion in this thread
that seems to boil down to a dogmatic kneejerk "C is better, C has always
been better, because Linux/Unix was programmed in it", and so little real
funded argumentation why this is really the case.

Sure, C has a tradition there, but that tradition doesn't help one bit if
you now start to develop a kernel in a new C compiler, that hasn't been
used for kernel development before.


More information about the fpc-other mailing list