Hello<br><br>I don't mean to start a culture war here, but I think there is a bit of overstatement in this post that 'C' is somehow a better language for writing an OS in than say Pascal or OP or anything else. <br>
<br>In point of fact, the only 'best' language for any processor is its own machine code which is always binary.<br>And the first operating system software written was done so in the assembly language which is written to use mnemoics <br>
that when 'assembled' convert directly into the binary machine language on a one to one basis. <br><br>Now EVERY compiled language, including  C, must be processed from its syntactical representation into assembly language or machine code. In fact, if you download the GCC complier source code and read it, you'll see  almost immediately that it actually a 'language' front-end connected to a 'assembler machine code' back end. <br>
<br>When the 'C' language was designed at AT&T it used 'assembler' like constructs and syntax because it's author wanted <br>to stop writing programs in a language called BCPL.. <br><br>So aside from a 'historical accident'  that the first AT&T OS ..UNIX.. was being written at the same time C was being developed, there is no other reason for any program, including an OS, to be written in C. To suggest that C is better is rather like suggesting that Spanish is a better language than English for writing a novel. <br>
<br>That said, if someone wished to write a modern OS in FP, which has nearly every programming construct that 'C' has (ints, doubles, floats, bytes, and bits) and you were willing to put in the time to fine tune and modify the FP compiler, you could produce a OS in FP that would be every bit as effective and perform as well or better as one written in C.  And as far as the processor running the OS couldn't tell what language the OS was written in.   <br>
<br>If anyone wants to convince themselves on this its simple, you'll find Ritchie (the creator of the C language) explained these points in the preface to his first book on C. There is also a brief mention of this in the Wikipedia article on the UNIX operating system. (see the article footnotes)<br>
<br>Prince <br><br><br><div class="gmail_quote">On Fri, Dec 5, 2008 at 6:59 PM, Guillermo Martínez Jiménez <span dir="ltr"><<a href="mailto:gmjimen@burdjia.com">gmjimen@burdjia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> Are you sure?<br>
<br>
Yes, I am.<br>
<div class="Ih2E3d"><br>
> doesn't older MacOS's versions where written in Object Pascal?<br>
<br>
</div>Yes, it does, but as I said I think it wasn't the better options.<br>
<div class="Ih2E3d"><br>
> 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.<br>

<br>
</div>I disagree.  C is better for write operating systems *by definition*:<br>
C was created to write UNIX, Pascal was created to learn good<br>
programming techniques.  C is low/mid-level language, Pascal is<br>
high-level (and Object Pascal is even higher):  OS are the lowest<br>
software level.<br>
<br>
I'm not saying it's impossible:  here you have MacOS and Toro. I'm<br>
just saying that _I think_ it isn't the best option.  Of course a<br>
better option is to write the kernel in C and Assembler and the<br>
utilities in Pascal and Object Pascal.<br>
<br>
Guillermo "Ñuño" Martínez<br>
<div><div></div><div class="Wj3C7c">_______________________________________________<br>
fpc-pascal maillist  -  <a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a><br>
</div></div></blockquote></div><br>