js' blog

Objective-C 1 support dropped in ObjFW
Created: 29.11.2015 14:33 UTC

This weekend, I dropped support for Objective-C 1 in ObjFW and cleaned up the code a lot by making use of Objective-C 2 features. Objective-C 2 makes a lot of code much easier to read and the backwards compatibility to Objective-C 1 meant many features like properties, fast enumeration and optional protocols couldn't be fully used (they could be used by someone using ObjFW, but not in ObjFW itself).

The downside is that this increases the requirement from GCC ≥ 4.0 or Clang to GCC ≥ 4.6 or Clang. But since today even GCC 4.6 is quite old, there is no reason to still support even older versions, especially as this means making the code uglier, a lot even. A few platforms were dropped from GCC 4.6 that were still supported by GCC 4.0, but none of them are really interesting for ObjFW. The most interesting of these was BeOS, which can still be supported using a Haiku toolchain. The others were mostly old versions of OSes for which a new version exists that runs on the same hardware.

Apple GCC is unaffected by this: Apple's GCC supported Objective-C 2 since Mac OS X 10.5. This is noteworthy as this is the only compiler that works for OS X on PowerPC.