4 ms·
Dear OP: why do you think the Win32 C APIs still exist? Microsoft have offered .NET for Windows since 2001. It does everything you're requesting but it hasn't r
by gilgoomesh 13y ago
Dear OP: why do you think the Win32 C APIs still exist? Microsoft have offered .NET for Windows since 2001. It does everything you're requesting but it hasn't replaced the completely hideous Win32 C APIs.
Bluntly: there is a class of programmers and programs that cannot be written without:
* C linkage
* Calling of and calling from C
And a further class of programs where:
* Garbage collection
* Significant runtime
* Safe code
Make acceptable performance impossible. This class of programs includes .NET itself which is entirely written on top of the Win32 C APIs.
If you want a runtime on top of Objective-C, you're welcome to write one yourself. It could offer everything you're requesting without needing to change anything about Objective-C.
Oh wait, there are literally dozens of runtimes on top of Objective-C. Not to mention official bindings to Python and other languages. Sure, none of them are very popular but if you want to write in something else: go ahead.
- jbrennan 13y agoAuthor here: Objective C is far and away mostly used for creating user-facing software. I want a better way to do that. That’s what the essay is about.
- gilgoomesh 13y agoHave you considered PyObjC for programming Mac OS in Python? https://pythonhosted.org/pyobjc/ https://pythonhosted.org/pyobjc/ Or Xamarin for programming iOS using Mono/C#? http://docs.xamarin.com/guides/ios/getting_started/hello,_world/ http://docs.xamarin.com/guides/ios/getting_started/hello,_wo... Or F-Script for programming Mac OS X from a command-line shell? http://www.fscript.org/ http://www.fscript.org/ All three are quite well established and work pretty well for what they do.
- pjmlp 13y agoI would like to add all of that is possible without C and has been achieved multiple times back when C was UNIX only. It is just the historical legacy fact that the majority of modern OS ABI == C ABI that keeps us have to link with it.
- bunderbunder 13y agoWell, that and C is a nice lowest common denominator; virtually any language can manage a fairly decent foreign function interface with C code without too terribly much friction.