[fpc-pascal] Please someone explain this to me

Anthony Walter sysrpl at gmail.com
Thu Feb 11 00:22:08 CET 2016


For those who didn't understand what I meant by using regions in the
interface section rather than include files, here is an image of what is
essentially in SysUtils currently:

http://cache.getlazarus.org/images/sysutils-include.gif

Notice the unit file is opened the almost none of what it declares is
visible. Instead the declarations are hidden in layers of header include
files. This makes it difficult to open a file and see what functions,
variables, classes, or types are available and can be used. And I might add
that this is problem isn't exclusive to the SysUtils unit.

Now here is an example where the interface section includes are moved to
regions:

http://cache.getlazarus.org/images/sysutils-region.gif

Notice you can actually browse through the types and other declarations by
simply scrolling down. I understand there might be situations where the
interface of a unit might differ per platform, but surely those situations
are in the minority, and they could either be placed in {$IFDEF} directives
or just those parts could be put in include files. As it is right now
nearly everything is is include files and nested include files making
browsing source code declarations more difficult than it should be.

It seems like this {$I sysinth.inc} for a header and {$I sysint.inc} for an
implementation harkens to C headers and C implementations, something which
Pascal is supposed to have done away with.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160210/5bd95eca/attachment.html>


More information about the fpc-pascal mailing list