ObjFW  Changes To ObjFW

Changes to "ObjFW" between 2024-08-18 21:15:49 and 2024-08-23 23:28:43

1
2
3

4
5
6
7
8
9
10
1
2

3
4
5
6
7
8
9
10


-
+







# What is  ObjFW?

ObjFW is a portable, lightweight framework for the Objective-C language. It enables you to write an application in Objective-C that will run on any [platform](Platforms) supported by ObjFW without having to worry about differences between operating systems or various frameworks you would otherwise need if you want to be portable.
ObjFW is a portable, lightweight framework for the Objective-C language. It enables you to write an application in Objective-C that will run on any [platform](/doc/trunk/PLATFORMS.md) supported by ObjFW without having to worry about differences between operating systems or various frameworks you would otherwise need if you want to be portable.

It supports all modern Objective-C features when using Clang, but is also compatible with GCC ≥ 4.6 to allow maximum portability.

ObjFW is intentionally incompatible with Foundation. This has two reasons:

* GNUstep already provides a reimplementation of Foundation, which is only compatible to a certain degree. This means that a developer still needs to care about differences between frameworks if they want to be portable. The idea behind ObjFW is that developers do not need to concern themselves with portability and making sure their code works with multiple frameworks: Instead, if it works with ObjFW on one platform, they can reasonably expect it to also work with ObjFW on another platform. ObjFW behaving differently on different operating systems (unless inevitable because it is a platform-specific part, like the Windows Registry) is considered a bug and will be fixed.
* Foundation predates a lot of modern Objective-C concepts. The most prominent one is exceptions, which are only used in Foundation as a replacement for `abort()`. This results in cumbersome error handling, especially in initializers, which in Foundation only return `nil` on error with no indication of what went wrong. It also means that the return of every `init` call needs to be checked against `nil`. But in the wild, nobody actually checks *each and every* return from `init` against `nil`, leading to bugs. ObjFW fixes this by making exceptions a first class citizen.