5 ms·
Their hinted opinion on that: > That being said, C/C++ are the only languages with a compiler supported by both Google and Apple, so using a different language
by zZorgz 7y ago
Their hinted opinion on that:
> That being said, C/C++ are the only languages with a compiler supported by both Google and Apple, so using a different language would have created a whole host of other problems to deal with.
- api 7y agoIs that still true? If Rust is built on clang it should not be that hard to port. Go also runs on both AFAIK.
- sally1620 7y agoRuns on a platform is very different from "officially supported"
- eridius 7y agoI'm not sure why "supported by both Google and Apple" is supposed to matter. Apple doesn't need to ship a Rust compiler for me to use Rust.
- zZorgz 7y agoLikely too much friction. Native environments benefit from using the expected IDE and tooling integration to build UI apps on respective platform. C or C++ is the best common supported language, and they didn't even like that. Also the UI frameworks are being written in said preferred language these days, eg SwiftUI, and adding one additional language could be perceived as a pain.
- eridius 7y agoApple ships a C++ compiler but you can't use C++ with Apple's platform SDKs. IF you want to use C++ you need to write Obj-C++ glue code to access most of the system frameworks, including UI code.
- zZorgz 7y agoI would look at it differently, i.e, obj-c++ is a valid supported language environment, that makes interopt with C++ pleasant at least compared to other interopt choices. Developers may choose to target Obj-C++ even out of preference.
- pjmlp 7y agoMetal and driver SDKs require C++.
- eridius 7y agoMetal is Obj-C.
- pjmlp 7y agoThen try to write Metal shaders in Objective-C.
- eridius 7y agoMetal shaders != Metal API. Metal API is Obj-C. Metal shaders are written in MSL (Metal Shading Language). C++ is still not involved, though MSL is admittedly based on C++.
- pjmlp 7y agoMetal API ⊇ Metal Shaders, it is useless without them. https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf https://developer.apple.com/metal/Metal-Shading-Language-Spe... "The Metal programming language is a C++14-based Specification with extensions and restrictions. Refer to the C++14 Specification (also known as the ISO/IEC JTC1/SC22/WG21 N4431 Language Specification) for a detailed description of the language grammar. This section and its subsections describe the modifications and restrictions to the C++14 language supported in Metal." Also, the MSL and Objective-C compilers are built on top of LLVM, written in C++.
- untog 7y agoLast I checked the Rust compiler doesn't output bitcode in the format Apple requires. So no Watch/TV apps.
- blub 7y ago1st tier tooling supported by the platform won't break yearly on every new OS version and you don't have to wait until your 2nd tier tooling developers gets around to fixing it. The platform developers will do their best to keep 1st tier tooling working and fix it when it breaks.