Comment by hgs3

2 years ago

It would be nice to have something like this except for Metal. I'm unsure why Apple made Metal an Objective-C API when C + Core Foundation would suffice. One big advantage of a C API is it's easy to interop with other programming languages.

Apple is opinionated about which languages should be used on their platforms, and they enforce it with these kinds of decisions.

For example, there was a time where Steve Jobs threatened to forbid iPhone apps not written in Obj-C, which would have destroyed the cross-platform ecosystem, at Apple's expense. Luckily, he was talked down from being that extreme.

  • Is there any way to enforce that in a way that can't be worked around with a shim? Demanding source code? Looking for signs of other languages in the binary and not allowing them in the appstore if detected?

    • > Is there any way to enforce that in a way that can't be worked around with a shim?

      You can’t definitively prove something was written in Objective-C or Swift, but you can often definitively prove something was not written in either pretty easily just by looking at the assembly.

    • I suppose the difficulty of proving that, short of demanding source code, helped prevent it from happening.