4 ms·
It's good somebody even tries to break the old myth about C as an essential kernel part. C is _not_ good for drivers: it lacks most of the appropriate abstracti
by almk277 13y ago
It's good somebody even tries to break the old myth about C as an essential kernel part. C is _not_ good for drivers: it lacks most of the appropriate abstractions, just as facilities to create them. Once we switch from asm to C - why not go further?
Speed matters, of course, but I suppose that even script speed is enough for many drivers (and, just in case, we have luaJIT).
Don't sure if lua is a right choice, but it's an interesting experiment - and this is what NetBSD is good for.
- simias 13y ago> C is _not_good for drivers You'll have to back up that assertion with some facts here, there's a whole industry and millions of lines of code that contradict you.
- almk277 13y agoIt's just legacy. C as infrastructure is good, C as a language is bad. There's a whole industry and millions of lines of code in visual basic, but I never met somebody who says that VB is good. Is there a way to say "do this under spinlock"? Is there a way to handle errors not mixing it with main logic? Not wrapping nearly every line with if/goto? Is there a way to create a generic collection? No, linux list.h is not that: it requires manual initialization, it does not work with elements, but with their special parts, it's macroses requires logically unneeded information (such as 'member' in list_for_each_entry), and so on. And this is the best you can do in C. C is too unobvious, too. Google for "wait4 backdoor". C works, of course. It just requires too much boilerplate code and too much programmer resources.
- pjmlp 13y agoC is designed for security exploits from day one. The industry of million lines of code exists, because UNIX and its system programming language, C, spread into the enterprise when the university students brought it from their labs into the enterprise. Thankfully the industry is slowly moving to other languages.