Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Starting with #Delphi #XE2 many of the new RTL units related to Vcl styles, OSX and so on, uses inc files to declare types, classes and implement code (just like the FPC does), what is the justification to do that? you can see what i mean if you inspect one of these folders (source\rtl\posix, source\rtl\posix\osx, source\rtl\sys )

share|improve this question
up vote 5 down vote accepted

Possibly to avoid duplicating this stuff in framework/platform specific units and without adding them to the most basic RTL units. Then again, that could also have been achieved with separate units. For type declarations that should really have been done. For implementation code I can see one reason to put it into an .inc file instead of its own unit: the code is relying on the Delphi specific rules regarding private class members (strict private was added to avoid this).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.