|
|
|
|
|
by toyg
2146 days ago
|
|
I agree but I think the issue here is complexity. This app is built with Swift, probably because most developers prefer high-level languages like that over system-level languages like ObjectiveC. Unfortunately, OS vendors typically don’t provide interfaces for high-level languages in their OS machinery unless strictly necessary. Can you actually write a Preferences panel in Swift? I wouldn’t be surprised if the answer were “nope, Obj-C only”. It’s not even an Apple thing, Windows has been the same for a very long time - remember how browser extensions “exploded” when Mozilla made it possible to write them in JS? IE forced you to C++, dramatically restricting the number of developers. |
|
I'd agree that most of the focus has been on app development, but I just found this toy kernel written in Swift the other day: http://si.org/projects/project1/
On the Objective-C side, sure you have access to all of the low level stuff of C, but Objective-C's message passing is probably a poor choice for very low-level system programming (in the kernel, for example). Apple uses C and C++ in the xnu kernel.
Swift was also designed to interoperate with C and Objective-C APIs, so you could certainly write a preference pane in it. It even automatically generates Swiftier interfaces for APIs that follow conventions. Here's the NSPreferencePane API: https://developer.apple.com/documentation/preferencepanes/ns...