Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you mean Objective-C code with minimal usage of C functions/structs/etc., then IMO Swift is actually the better systems language. Cf. the just-announced System library.


I love Swift, and it would be a great systems language, but it is important for system languages to have some kind of "bare metal" interfaces, with solid, predictable binary expression. Even C generally needs to be implemented in some kind of specialized embedded form for a lot of tools.

To me, Swift is a fairly high-level language, and I like that. I cut my teeth on the bare metal, and don't really miss working at that level.


That is the ultimate goal, yet stuff like Metal gets written in a mix of Objective-C and C++14, with Swift bindings.


Correct me if I'm wrong, but I'd bet Metal is almost entirely C++ with a little Obj-C sprinkled on top for the API. And of course C++ is still a better systems language than Swift.

My point was that Swift is better than pure Obj-C for systems programming. Admittedly, that might be a poor comparison, since Obj-C was specifically built to be used alongside C as the systems language.

But yes, I think the ultimate goal is that Swift will be better than C/C++ for systems programming too. It still has a ways to go, and there are a lot of libraries that will need to be written, but I do think it's possible.


> Metal is written in Objective-C, is based on Foundation, and makes use of Grand Central Dispatch to synchronize between the CPU and GPU.

https://www.objc.io/issues/18-games/metal/

C++ is used for Metal shaders.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: