[Lazarus] FPDoc Editor fails on namespace dotted unit names?

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Apr 14 10:31:33 CEST 2013


On Sun, 14 Apr 2013 10:12:45 +0200
Sven Barth <pascaldragon at googlemail.com> wrote:

> On 14.04.2013 09:59, Mattias Gaertner wrote:
> > On Sun, 14 Apr 2013 09:41:01 +0200
> > Sven Barth <pascaldragon at googlemail.com> wrote:
> >
> >> On 14.04.2013 00:38, Mattias Gaertner wrote:
> >>> On Sat, 13 Apr 2013 17:30:15 -0400
> >>> Anthony Walter <sysrpl at gmail.com> wrote:
> >>>
> >>>> It would seem that the Lazarus IDE integrated documentation editor fails to
> >>>> work with units which use dotted names. For example:
> >>>>
> >>>> unit MyCompany.Utilities.Text;
> >>>>
> >>>> Can someone verify this for me? I am preparing some OSS pascal packages (a
> >>>> cross platforming gaming library) which use the above pattern for unit
> >>>> organization and was hoping to start writing documentation.
> >>>
> >>> I'm curious: why do you use dots instead of for example underscores?
> >>
> >> Why shouldn't you? Also in difference to underscores each part of the
> >> dotted unit name will be a unique symbol. E.g. for a unit name like
> >> System.Collection.Generics all three parts will be a symbol so you can't
> >> use them in your code (can be considered both an advantage and a
> >> disadvantage).
> >
> > Thanks. You are one of the few people who give some arguments
> > beside aesthetic reasons.
> >
> >
> >> Also FPC will in the future also provide units with dotted unitnames to
> >> increase compatibility with Delphi XE2 and newer.
> >
> > Can you explain or give some link about the rules for dotted unit names
> > FPC will implement?
> 
> It's still a bit in flux and currently only discussed on the core list, 
> but basically the idea is to use Delphi XE2's unit naming scheme at 
> least for the base units (e.g. System.SysUtils.pp or System.Classes.pp) 
> and make these units use String=UnicodeString while the non dotted units 
> (to stay with the example SysUtils.pp and Classes.pp) keep 
> String=AnsiString for backwards compatiblity.
> I hope that more information can be provided after the compiler 
> Hackathon from 30th May to 2nd June where some of use will try to 
> implement this scheme (and also extend the compiler with a few things 
> for this).

Yes, afair this basic idea was already mentioned on some other list.

I meant, can you give me the rules for the dotted unit name scopes that
FPC will implement. Like the "System.Collection.Generics all
three parts will be a symbol so you can't use them in your code". What
exactly does that mean? Are there already some documentations,
examples, fpc test units?

Mattias




More information about the Lazarus mailing list