mulle-objc: present and absent language features
Continued from mulle_objc: inheriting methods from protocols of the mulle_objc series.
Updated: 7. November 2016
Objective-C is now a hybrid of many languages. The timeline being approximately this:
ObjC 1.0: C plus Smalltalk <- appeasement of the Java Noobs ObjC++ ObjC 2.0 <- usurpation by the C++ Flagellants
mulle_objc is supposed to put the basis of Objective-C back to ObjC 1.0 and cherrypick improvements from the later versions.
Here is a list of what's going on and what will be going on and what will not happen. Taking most of the terminology from:
The separation between Compiler, Runtime and Language is of course a bit arbitrary.
|BOOL||supported: but it is an
|@1, @(), ...||planned: what is known as "Literals"|
|NSArray *foo; foo[ 1]||not planned: [^1] what is known as "Subscripting"|
|@encode()||supported: 90% the same as the Apple runtime|
|@package||never: will produce an error|
|for ( i in x)||supported: what is known as "Fast Enumeration"|
|atomic nonatomic||not planned|
|atomic as default||never|
|nullable||not planned: will produce an error [^2]|
|property dot syntax||not planned: [^1]|
|Protocol||never: you have to use
||will be a nop #define (also
||could be a nop #define (
|ARC||never, but look below for AAM|
|variadic arguments (:...)||supported, but not compatible to
|^blocks||not planned: [^3]|
|ObjectiveC++||never: But the mulle-objc instance memory layout should be
|Class extensions||never: at least when you want to add instance variables|
Other "planned" features
For some of the "supported" features like protocol inheritance, please read the complete series.
|AAM||supported: a much simpler successor to ARC called "Always Autoreleased Mode"|
|Generated parameter compliancy asserts||planned: with a special compiler option each object parameter of a method will be checked with
|Method chaining||technically supported: you can search the runtime to supply you with the overridden methods. But it's slow.|
[^1] : This is basically operator overloading, which is un-C like.
[^2] : Superflous keyword, ObjC is by design nullable. It only makes sense to adorn non-nullable parameters.
[^3] : GCD is a Apple technology, that really needs kernel support to work well. lambdas are not a part of C11. Generally I find blocks unconvincing. It might be an idea to make
NSInvocations out of block syntax ?
|supported||should work already|
|will be supported||must work with the first release|
|not supported||might just accidentally work|
|planned||may not be in the first release|
|unknown||neither "planned" not "not planned"|
|not planned||never say never, but this probably won't happen|
|never||sometimes you have to say never :)|
Continue to mulle-objc: the trouble with property