[Lazarus] Support for dotted unit name

Christian-W. Budde Christian at savioursofsoul.de
Fri Nov 4 13:04:25 CET 2011


Hello,

> This is the explanation for using unitname.identifier, which worked
> since many years.
>
> Dotted unit name means dots in the unit name itself. For example
> an.example.pas. I don't know a good example.

For me, this makes perfect sense, because of many reasons. Here are a
couple.

I work on several open source projects, which have in common that all
these projects are marked with the abbreviation before the actual unit
name. For example with Graphics32 it is 'GR32_'. Replacing the
underscore with a '.' would make it appear more logical from a pascal
point of view (underscores shall be avoided in favor of CamelCase) and
the handling of units look more like records then.

In my second project I have another example where it makes sense from a
hierarchical point of view. There I have implemented dozens of filters,
with lots of optimizations resulting in a vast amount of code. When I
wanted to split this code into several units I thought, that it should
have the name Filters first. But, to give an example, this would result
in 'FiltersButterworth', 'FiltersChebyshev' and 'FiltersBasic'. It just
seems to be odd in the english language, where it would rather be
'ButterworthFilters', 'ChebyshevFilters' and so on.

Separating the names by something like a '.' would make much sense in my
opinion.

I have never used .NET, nor am I a Delphi fan-boy, but I think this
scoping is useful and I hope it will be supported by FPC. It is
discussable, whether it shall be used in Lazarus, but it should be
supported.

	Christian





More information about the Lazarus mailing list