[ProgClub list] Memory management in C

Asher Glynn asher.glynn at gmail.com
Sun Oct 2 04:11:30 AEDT 2011


> > I'm learning more about C, and the more I learn the more I'm
> > convinced that C programmers just like making life difficult for
> > themselves. There really isn't anything that great about C.
>
>  Check the 'first published' date in that copy of K&R again.
>
>  'Full of bugs and hacks' may be a bit of a disservice too.  We are
>  talking about breathtakingly well-bearded men here.
>
>  The usual response is 'try writing an OS in {insert molly-coddling
>  language of choice that the initiate currently likes here}'.
>
>  While things like this[1] or this[2] are pretty cool, they're not
>  *really* serious.  While I'm not much of a linguist, I can't think
>  of another language that would be suitable (today) to build
>  an OS in.
>

... actually, MS wrote an experimental OS that was completely in .Net which,
by the few people I know who actually saw it, was really, really good. But
wouldn't have supported the old Win API so wasn't going anywhere.

IBM writes a lot of their mainframe operating systems in PL/X which is a
variant on PL/I. OS/400 I believe has a bit in some OO variant of RPG.

I'd personally be inclined to have a stab with Oberon (since they've
developed an OS in it anyway), its Pascal derivative and supports some very
nice features.

And interestingly you probably wouldn't use many of C's defaults - I think
its already been commented that its method of passing parameters is actually
rather inefficient, as is its string representations, and its memory model
is quite dangerous. You wouldn't use its default linking method either. This
is kind of true for a lot of OSes that are "written in C" at any rate.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.progclub.org/pipermail/list/attachments/20111001/596a8737/attachment.html>


More information about the list mailing list