Hacker News new | ask | show | jobs
by rgovostes 2156 days ago
I wouldn't characterize Swift as "high-level" and Objective-C as "system-level." One of Swift's stated design goals is to work at all levels of the technology stack, including system programming where you need a lot of control over struct layouts and so on.

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...