Apple is the backing force of ObjectiveC.
However WebKit is written in C++.
Apart from portability (not all systems have ObjectiveC compilers/runtimes) is there any other valid reason for this? Performance, features?
Lately Apple does not seem to care of other languages than ObjectiveC.
Aside from portability, the use of C++ is an historical artefact. WebKit wasn't started by Apple; it was a fork of KHTML, which was developed as part of the KDE project. The decision to use C++ was made by the KHTML team, likely because KDE itself is written in C++ using the Qt framework.
WebKit was originally forked from KHTML, which is written in C++. This, and the fact that it is "more" portable (not really, but it's hard to find ObjC developers for other platforms) probably contributed to Apple not rewriting it in ObjC. This has proven to be a good decision lately, after Google picked it up for their own browser, Chrome, which has resulted in several major contributions and thus a very up-to-date/on-the-edge renderer.
WebKit is a fork of KHTML which was written in C++...
You will ask me... Why KHTML was written in C++ ? I do not know.
Check the WebKit homepage. It is a branch of the KHTML library used in Konqueror, so Apple really had nothing to do with deciding what language it was written in.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With