|
|
|
|
|
by pjmlp
5154 days ago
|
|
This just goes to show you don't understand compilers. All languages require runtimes, even C. The thing is that C as high level assembler it is, uses the operating system as its runtime. The C language is also part of Objective-C, in a similar vein as C++ also supports most of the C89 features with small exceptions. So it is possible to have the Objective-C runtime compiled using the C subset of Objective-C. This is known as compiler bootstrapping. |
|
No, admittedly, I don't, at any more than a basic level. But you're still wrong.
Try compiling, linking, and running an ObjC program without the ObjC runtime. See how that fails. See how long it takes you to write a minimal runtime that can run your program in user-space, and then kernel-space. It won't be quick.
Try compiling, linking, and running a plain-vanilla C program without the "C runtime" (I guess you mean a combination of libc, libgcc, and crt.o, basically what you get when you pass -nostdlib -nostartfiles to gcc). Yep, that'll fail too. Then get it to compile and run anyway. Not that hard.
That's* the difference I'm talking about.
At the very least, kernels like Linux and Mach/Darwin already have kernel-friendly replacements for the libc functionality they commonly use. Doing something similar for ObjC would be time consuming. Certainly it isn't impossible, but note that I never said that: I merely pointed out it wasn't easy.