FPC New Features Trunk

From Lazarus wiki
Revision as of 16:53, 23 December 2010 by Jonas (talk | contribs) (language corrections)
Jump to navigationJump to search

About this page

Below you can find a list of new features introduced since the previous release, along with some background information and examples.

All systems

Language changes

Better support for Delphi-compatible classes

  • Overview: Support has been added for nested types (including other classes), class variables and class-local constants.
  • Notes: Delphi-compatible.
  • More information: class_extensions_examples lists several examples that make use of these features.

Scoped enumerations

Custom deprecated messages

  • Overview: Deprecated can now be applied to virtually any syntactic element (including constants and units), and it is also possible to specify a custom deprecation message.
  • Notes: Delphi-compatible
  • More information:

<delphi> Todo: write example </delphi>

Support for Objective-Pascal dialect

  • Overview: On Mac OS X, most system frameworks are written in Objective-C. While it is possible to interface them via a procedural API, this is not very convenient. For this reason, we have created a new dialect called Objective-Pascal that enables seamless interacting with Objective-C code.
  • Notes: This new dialect is currently only supported on Darwin-based platforms (including iOS) using the Apple Objective-C runtime. Patches to add support for the GNUStep runtime are welcome.
  • More information:
    • FPC_PasCocoa explains the basic language definitions.
    • FPC_PasCocoa/Differences explains some of the differences between Objective-Pascal and on the one hand Object Pascal, and on the other hand Objective-C.