[fpc-pascal] Problem with Objective Pascal and delphi mode

Jonas Maebe jonas.maebe at elis.ugent.be
Sat Jan 30 20:25:50 CET 2010

On 30 Jan 2010, at 20:08, Felipe Monteiro de Carvalho wrote:

> One more thing, why is the modeswitch called objectivec1 ? It could be
> objectivepascal instead.
> Does the number 1 imply that it's version 1 of the mode and there may
> be multiple versions supported at the same time? Or was it for
> Objective C Runtime Library 1.0 ? (I am almost sure that not)

It means/meant version one of the Objective-C language. The Objective-C language evolves semi-independently of the run time (you can write programs in Objective-C 2.0 running on i386 and ppc32, whose Objective-C runtime is version 1). Objective-C 2.0 (the language) features require Mac OS X 10.5 or later, while 1.0 features are available as of 10.0.

See http://en.wikipedia.org/wiki/Objective-C#Objective-C_2.0 and http://lists.apple.com/archives/Objc-language/2006/Aug/msg00039.html for some features that were added in 2.0. And I just realised I actually already added a feature of Objective-C 2.0, namely the ability to specify protocol methods as "optional" (although this will not break programs when running on 10.4 and earlier, because those systems only have version 1.0 of the run time, and in that case no distinction is made in the rtti between optional and required methods -- so this means that FPC takes these modifiers into account during compilation, but the run time won't see/check them when running on such systems).

That's also why it says objectivec1 and not objectivepascal1: it refers to the Objective-C 1.0 language.


More information about the fpc-pascal mailing list