[Lazarus] Namespace

Marcos Douglas md at delfire.net
Tue Jan 11 12:12:28 CET 2011


2011/1/10 Michael Van Canneyt <michael at freepascal.org>:
>
>
> On Mon, 10 Jan 2011, Marcos Douglas wrote:
>
>> On Mon, Jan 10, 2011 at 4:34 PM, Michael Van Canneyt
>> <michael at freepascal.org> wrote:
>>>
>>> The prefix is not needed. It makes it easier, but is by no means a
>>> requirement, as long as you keep the unit names separate.
>>>
>>> Compare
>>>
>>>  Edit1 : myedit.tedit
>>>
>>> to
>>>
>>>  Edit1 : tmyedit
>>>
>>> In the second case, you'll cover 99% of all cases.
>>>
>>> If by any chance there is an overlap, then the first scenario
>>>
>>>  edit1 : myedit.tmmyedit
>>>
>>> is still an option.
>>
>> Right! But you saw what I written in first mail of this thread?
>> See:
>> "If units are namespaces, why not use them in widgets declarations,
>> automatic, in Lazarus?
>> When we droped a widget in a Form, ie a TEdit, the declarion would be like
>> this:
>> TForm1 = class(Form)
>> Edit1: StdCtrls.TEdit;
>> end;"
>>
>> I talked about the Lazarus put the unit name like a prefix in all classes.
>
> I know.
>
> But if implemented, I would strongly suggest that this is an option, off by
> default; I would not want it in my code. I don't see the use of it, but of
> course each has his way, and if that works better for you, why not...

Thank you, Michael.

Marcos Douglas




More information about the Lazarus mailing list