Re: [Lazarus] OT: Namespaces?

2009-04-08 Thread Tom Miller
This isn't name spacing, but aliases. Hans-Peter Diettrich wrote: > From a discussion I want to present this idea: > > FPC (and Delphi) could extend the Uses syntax to >USES [IN ] [AS ] > > The optional AS part would allow to create an alias (shortcut...) for > units of possibly conflicting

Re: [Lazarus] OT: Namespaces?

2009-04-07 Thread Mattias Gaertner
On Tue, 7 Apr 2009 18:31:54 +0200 zeljko wrote: > On Tuesday 07 April 2009 16:59, Mattias Gaertner wrote: > > On Tue, 7 Apr 2009 15:32:28 +0200 > > > > zeljko wrote: > > > On Tuesday 07 April 2009 15:11, Mattias Gärtner wrote: > > > > AFAIK under Delphi the 'in' modifier has two purposes: > > >

Re: [Lazarus] OT: Namespaces?

2009-04-07 Thread zeljko
On Tuesday 07 April 2009 16:59, Mattias Gaertner wrote: > On Tue, 7 Apr 2009 15:32:28 +0200 > > zeljko wrote: > > On Tuesday 07 April 2009 15:11, Mattias Gärtner wrote: > > > AFAIK under Delphi the 'in' modifier has two purposes: > > > - mark the unit as part of the project > > > - use a unit from

Re: [Lazarus] OT: Namespaces?

2009-04-07 Thread Mattias Gaertner
On Tue, 7 Apr 2009 15:32:28 +0200 zeljko wrote: > On Tuesday 07 April 2009 15:11, Mattias Gärtner wrote: > > > > > AFAIK under Delphi the 'in' modifier has two purposes: > > - mark the unit as part of the project > > - use a unit from a directory which can not be added to the unit > > search pat

Re: [Lazarus] OT: Namespaces?

2009-04-07 Thread Mehmet Erol Sanliturk
On Tuesday 07 April 2009 05:36:43 am Mattias Gärtner wrote: > Zitat von Hans-Peter Diettrich : > > Mattias Gärtner schrieb: > > > FPC supports unit alias in a unit, but it does not support two different > ppu with the same name. At least 2.2.3 does not. > You will get linker errors, because identi

Re: [Lazarus] OT: Namespaces?

2009-04-07 Thread zeljko
On Tuesday 07 April 2009 15:11, Mattias Gärtner wrote: > > AFAIK under Delphi the 'in' modifier has two purposes: > - mark the unit as part of the project > - use a unit from a directory which can not be added to the unit search > path, because there is a duplicate. Lazarus uses same logic isn't

Re: [Lazarus] OT: Namespaces?

2009-04-07 Thread Mattias Gärtner
Zitat von Marco van de Voort : > On Tue, Apr 07, 2009 at 11:36:43AM +0200, Mattias G?rtner wrote: > > > > > > Now we can go on-topic: While FPC already supports true unit alias, > > > > FPC supports unit alias in a unit, but it does not support two different > ppu > > with the same name. At least

Re: [Lazarus] OT: Namespaces?

2009-04-07 Thread Marco van de Voort
On Tue, Apr 07, 2009 at 11:36:43AM +0200, Mattias G?rtner wrote: > > > > Now we can go on-topic: While FPC already supports true unit alias, > > FPC supports unit alias in a unit, but it does not support two different ppu > with the same name. At least 2.2.3 does not. > You will get linker errors,

Re: [Lazarus] OT: Namespaces?

2009-04-07 Thread Hans-Peter Diettrich
Mattias Gaertner schrieb: >> Now we can go on-topic: While FPC already supports true unit alias, >> Lazarus (code completion...) cannot handle unit1B in your example :-( > > Have you updated to svn 19249? I've just updated to svn 19273, and the problem persists. Though, Lazarus says SVN 19172 i

Re: [Lazarus] OT: Namespaces?

2009-04-07 Thread Mattias Gärtner
Zitat von Hans-Peter Diettrich : > Mattias Gärtner schrieb: > > >>> why aliases units names are required? > >> E.g. when you have multiple third-party units of the same name. > > > > Isn't that already supported by the 'in' modifier? For example: > > > > uses unit1, unit1B in '../test/unit1'; > >

Re: [Lazarus] OT: Namespaces?

2009-04-06 Thread Mattias Gaertner
On Mon, 06 Apr 2009 20:28:27 +0200 Hans-Peter Diettrich wrote: > Mattias Gärtner schrieb: > > >>> why aliases units names are required? > >> E.g. when you have multiple third-party units of the same name. > > > > Isn't that already supported by the 'in' modifier? For example: > > > > uses unit

Re: [Lazarus] OT: Namespaces?

2009-04-06 Thread Hans-Peter Diettrich
Mattias Gärtner schrieb: >>> why aliases units names are required? >> E.g. when you have multiple third-party units of the same name. > > Isn't that already supported by the 'in' modifier? For example: > > uses unit1, unit1B in '../test/unit1'; Heureka :-) While Delphi 7 requires that the unit

Re: [Lazarus] OT: Namespaces?

2009-04-06 Thread Mattias Gärtner
Zitat von Hans-Peter Diettrich : > dmitry boyarintsev schrieb: > > > why aliases units names are required? > > E.g. when you have multiple third-party units of the same name. Isn't that already supported by the 'in' modifier? For example: uses unit1, unit1B in '../test/unit1'; Now you have an '

Re: [Lazarus] OT: Namespaces?

2009-04-06 Thread Marco van de Voort
On Mon, Apr 06, 2009 at 11:07:48AM +0200, Hans-Peter Diettrich wrote: > From a discussion I want to present this idea: > > FPC (and Delphi) could extend the Uses syntax to >USES [IN ] [AS ] > > The optional AS part would allow to create an alias (shortcut...) for > units of possibly confli

Re: [Lazarus] OT: Namespaces?

2009-04-06 Thread dmitry boyarintsev
> E.g. when you have multiple third-party units of the same name. there's a good ways to handle this: rename your units (adding my prefixed, like my_* to unit name). Usually 3d party units (usually libraries) do this, prefixing their names. after all, aliasing is dangerous, because, you might cau

Re: [Lazarus] OT: Namespaces?

2009-04-06 Thread Hans-Peter Diettrich
dmitry boyarintsev schrieb: > why aliases units names are required? E.g. when you have multiple third-party units of the same name. DoDi ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Re: [Lazarus] OT: Namespaces?

2009-04-06 Thread dmitry boyarintsev
why aliases units names are required? ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

[Lazarus] OT: Namespaces?

2009-04-06 Thread Hans-Peter Diettrich
From a discussion I want to present this idea: FPC (and Delphi) could extend the Uses syntax to USES [IN ] [AS ] The optional AS part would allow to create an alias (shortcut...) for units of possibly conflicting (same) name. IMO a simple implementation of the most important benefits of na