On 26 July 2010 23:37, Martin wrote:
> Hm, this may be one silly question...
>
> but I couldn't find docs on it, I hadn't come accross it before...
>
> A file that should compile can start with:
> 'unit xxx;'
> 'program xxx'
...and there is 'library xxx' too
--
Regards,
- Graeme -
___
In our previous episode, Martin said:
> Hm, this may be one silly question...
>
> but I couldn't find docs on it, I hadn't come accross it before...
>
> A file that should compile can start with:
> 'unit xxx;'
> 'program xxx'
>
> but I found fpc also compiles
> 'package xxx; '
>
> What dos it d
Hm, this may be one silly question...
but I couldn't find docs on it, I hadn't come accross it before...
A file that should compile can start with:
'unit xxx;'
'program xxx'
but I found fpc also compiles
'package xxx; '
What dos it do? Where are the docs?
__
On 26 July 2010 19:26, Thierry Coq wrote:
>
> I see units as namespaces already existing: we use the unit names to prefix
> ambiguous function or variable names for example.
Unit Names give very limited namespace support - which only applies to
types or procedures/functions or global variables (a
On Mon, Jul 26, 2010 at 8:26 PM, Thierry Coq wrote:
> Like Michael,
>
> I see units as namespaces already existing: we use the unit names to prefix
> ambiguous function or variable names for example.
>
> In addition, units are similar (but simpler) to Ada packages, which are
> much more robust th
Like Michael,
I see units as namespaces already existing: we use the unit names to
prefix ambiguous function or variable names for example.
In addition, units are similar (but simpler) to Ada packages, which are
much more robust than namespaces. If we want to go the full way, let's
implement
In our previous episode, Graeme Geldenhuys said:
> >
> > Regarding your ideas 2 and 3: as they are not Delphi compatible they
> > might be considered a "bad thing" (TM) by the FPC developers.
>
> Currently FPC developers do not want to implement the "dotted" namespace
> idea from Delphi - though
I use symbolic links. I created /opt/fpc directory which contains subdirectories for each version I have available. /opt/fpc/fpc-current is a symbolic link to the directory of the version of fpc I am currently using. /opt/fpc/bin is a symbolic link to /opt/fpc/fpc-current/bin. In order to switc
On Mon, Jul 26, 2010 at 11:47 AM, Martin wrote:
> On 26/07/2010 15:36, Marcos Douglas wrote:
>> [snip]
>>
>> {$NAMESPACE ON}
>> unit strutils namespace my;
>>
>> With {$NAMESPACE ON} all units will have namespaces, unless FPC's units.
>>
>
> Not sure why a directive?
>
> To allow none fully qualif
Hi everyone,
Could you please move this thread to the fpc-devel list?
Thanks,
Jonas
FPC mailing lists admin
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
On 26/07/2010 15:36, Marcos Douglas wrote:
On Mon, Jul 26, 2010 at 11:20 AM, Sven Barth
wrote:
What about that the compiler enforces that you use the fully qualified name
if you used it in the uses?
Not only if you used it in the uses clause, but if you COMPILED with
namespace sinta
Op 2010-07-26 16:10, Sven Barth het geskryf:
>
> Are you sure that "_" is not allowed at the beginning of a unit name?
> Compiles without problems.
I wasn't. Thanks for confirming. So indeed the ugly _ syntax
can't be used.
I quite like Marcos Douglas's idea of using a colon between the namespac
Op 2010-07-26 16:23, Marcos Douglas het geskryf:
>>
>> Hmm... "~" looks ugly :P
>
> IMHO, is better to use the ':' like myspace:sysutils
That does indeed look better.
Regards,
- Graeme -
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.or
On Mon, Jul 26, 2010 at 11:33 AM, Reimar Grabowski wrote:
> On Mon, 26 Jul 2010 11:23:31 -0300
> Marcos Douglas wrote:
>
>> IMHO, is better to use the ':' like myspace:sysutils
>
> Even better C++ style:
>
> uses
> myspace::sysutils;
>
> begin
> Exception; // no error
> SysUtils.Exception; //
On Mon, Jul 26, 2010 at 11:20 AM, Sven Barth
wrote:
>
> What about that the compiler enforces that you use the fully qualified name
> if you used it in the uses?
Not only if you used it in the uses clause, but if you COMPILED with
namespace sintaxe (eg. by Graeme unit strutils namespace my), IMHO
On Mon, 26 Jul 2010 11:23:31 -0300
Marcos Douglas wrote:
> IMHO, is better to use the ':' like myspace:sysutils
Even better C++ style:
uses
myspace::sysutils;
begin
Exception; // no error
SysUtils.Exception; // identifier not found
MySpace::SysUtils.Exception; // no error
end.
R.
-
On Mon, Jul 26, 2010 at 11:20 AM, Sven Barth
wrote:
> Hi!
>
> On 26.07.2010 16:06, Martin wrote:
But worst of all
uses sysutils; // the one from my project?
>>>
>>> No, because the RTL is not compiled with a namespace, so falls under the
>>> "global" namespace with takes preference
Hi!
On 26.07.2010 16:06, Martin wrote:
But worst of all
uses sysutils; // the one from my project?
No, because the RTL is not compiled with a namespace, so falls under the
"global" namespace with takes preference over project units or all other
namespaces. This then stays consistent with how de
Hi!
On 26.07.2010 15:44, Graeme Geldenhuys wrote:
uses rc.foo, my.foo, my; // there is a unit my
...
begin
foo.a; // error, which foo?
my.foo.a; // is that unit my, record foo.a OR unit my.foo ?
Good point, I haven't thought that far. I only worked though of the uses
clause. Maybe whe
On 26/07/2010 14:44, Graeme Geldenhuys wrote:
Please note: I did not say my ideas are perfect, just that they are
suggestions that was put out there. Discussions regarding namespaces and
ideas/suggestions need to filter out the finer details of what could or
couldn't work. This is the whole point
Op 2010-07-26 14:34, Martin het geskryf:
> Let me see, if I got the idea (Graeme's idea) correct.
Please note: I did not say my ideas are perfect, just that they are
suggestions that was put out there. Discussions regarding namespaces and
ideas/suggestions need to filter out the finer details of w
Hi,
I created a wiki page for this to consolidate ideas.
http://wiki.freepascal.org/Namespaces
Regards,
- Graeme -
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
On 26 Jul 2010, at 14:18, Bernd Kreuss wrote:
> What is the easiest way to have a second installation of FPC around that
> I can easily switch to on the same machine without having to change half
> a dozen paths and moving config files around?
Personally, I never actually install my development
On 25/07/2010 22:53, Graeme Geldenhuys wrote:
On 25 July 2010 23:30, Michael Van Canneyt wrote:
The discussion is not about namespaces. Object Pascal HAS namespaces,
namely units. The discussion is about 'enhancing' the namespace to allow one
or more dots in the name.
With the importa
Currently I have the latest svn of FPC installed (make install) which
results in all files being installed where they belong, the binary being
in the search path and fpc.cfg in /etc and I can easily use it with Lazarus.
Now I want to test something I wrote whether it will compile with an
older ver
On Mon, 26 Jul 2010 12:14:26 +0200
Graeme Geldenhuys wrote:
> Just to show how ugly unit names look with prefixes.
> eg:
> tiUtils.pas vs tiutils.pas vs utils.pas
Is this really a problem that warrants time to develop and test a solution?
Two letters?
Well, it is your time after al
On Mon, Jul 26, 2010 at 4:40 AM, Graeme Geldenhuys
wrote:
> In short - Delphi in-compatibility is not a
> problem here, just like Generics or Compiler Modes or . FPC doesn't do
> everything like Delphi, sometimes it does things _better_ than Delphi. FPC
> Namespaces would hopefully fall under
Op 2010-07-26 11:18, Sven Barth het geskryf:
> Yes, FPC is free and examples where an older version of FPC is needed
> can only be constructed artificially, but the Delphi case still holds.
> E.g. tiOPF supports Delphi besides FPC.
> I don't know the unit structure of tiOPF but suppose you have a
Op 2010-07-26 11:34, Michael Van Canneyt het geskryf:
>
> Well, I fail to see what is more logical in my.constants than in myconstants.
> The unit is still called my.constants, not constants. So you'll end up
> typing my.constants everywhere anyway. The gain of this over myconstants is
> highly de
On Sun, 25 Jul 2010, Graeme Geldenhuys wrote:
On 25 July 2010 23:30, Michael Van Canneyt wrote:
The discussion is not about namespaces. Object Pascal HAS namespaces,
namely units. The discussion is about 'enhancing' the namespace to allow one
or more dots in the name.
With the importance t
Hi!
Am 26.07.2010 10:40, schrieb Graeme Geldenhuys:
Op 2010-07-26 10:14, Sven Barth het geskryf:
Regarding your ideas 2 and 3: as they are not Delphi compatible they
might be considered a "bad thing" (TM) by the FPC developers.
Currently FPC developers do not want to implement the "dotted" n
Op 2010-07-26 10:14, Sven Barth het geskryf:
>
> Regarding your ideas 2 and 3: as they are not Delphi compatible they
> might be considered a "bad thing" (TM) by the FPC developers.
Currently FPC developers do not want to implement the "dotted" namespace
idea from Delphi - though they already st
Hi!
I personally don't have a real opinion pro or against extended
namespace, so I'll try to answer as neutral as possible.
Am 25.07.2010 19:45, schrieb Graeme Geldenhuys:
1) Follow the "dotted" notation for unit names as implemented in Delphi.
(...)
2) Another idea is in a way similar
33 matches
Mail list logo