Re: Kernel Development & Objective-C

From: David Newall
Date: Sat Dec 01 2007 - 04:50:33 EST


Chris Snook wrote:
Ben Crowhurst wrote:
Has Objective-C ever been considered for kernel development?

No. Kernel programming requires what is essentially assembly language with a lot of syntactic sugar, which C provides.

I somewhat disagree. Kernel programming requires and deserves the same care, rigor and eye to details as all other serious systems. Whilst performance is always a consideration, high-level languages give a reward in ease of expression and improved reliability, such that a notional performance cost is easily justified. Occasionally, precise bit-diddling or tight timing requirements might necessitate use of assembly; even so, a lot of bit-diddling can be expressed in high-level languages.

Kernel programming might require a scintilla of assembly language, but the very vast majority of it should be written in a high-level language.

There's an old joke that claims, "real programmers can write FORTRAN in any language." It's true. Object orientation is a style of programming, not a language, and while certain languages have intrinsic support for this style, objects, methods, properties and inheritance can be probably be written in any language. It's an issue of putting in care and eye to detail.

Linux could be written in Objective-C, it could be written in Pascal, but it is written in plain C, with a smattering of assembler. Does it need to be more complicated than that?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/