On Friday 18 January 2008 20:12, John Stoneham wrote:
[Ada package system]
> However, you can also do:
> with Unit_1; use Unit_1;
> This imports the namespace of Unit_1 into the current file so that
> now you *can* refernce "foo" without a qualifier. It's as if all the
> identifiers in Unit_1 w
Marco van de Voort schrieb:
As far as I can see this is
no real advantage, except allowing dots in unitnames.
That is what I want. :-)
Ok, the better way are child units, but the dots would be a nice feature.
g
Micha
___
fpc-pascal maillist - fpc-
Jonas wrote:
> >> The magic word would be "scope" here. It's the same as with using two
> >> different units including the same identifier twice.
> >
> > Yes and no, of course it will work, but might be counterintuitive.
> >
> > uses x, a.b.c;
> >
> > a.b.c.d.
> >
> > if x also contains an identif
On 18/01/2008, Bee <[EMAIL PROTECTED]> wrote:
> > Well, the statements so far went like "this sub.sub.unit stuff is
> > just .NET crap, we won't implement any of those". ;)
>
[snip]
>
> Like FPC supports the ugly '+=' C syntax. :-P Maybe it's a good feature
> for some 'lazy' programmers, but I pers
On 1/18/08, Vinzent Höfler <[EMAIL PROTECTED]> wrote:
> > On the other hand:
> >
> > uses a;
> >
> > var a:byte;
> >
> > ... both unit a as variable a would go into the global symtable, which
> > is the same lexical level, thus causing duplicate identifier conflicts.
>
> In Ada the fully qualified
Daniël Mantione wrote:
Op Fri, 18 Jan 2008, schreef Vinzent Höfler:
Maybe my view is skewed too much by the use of Ada where even a
function declares a "record identifier". In Ada it is even possible to
do:
---
procedure Test is
X : Integer;
procedure B is
X : Integer;
begin
Michael Van Canneyt wrote:
You are wrong. It does not compile, neither in delphi, nor in FPC.
D is not found, because 'A' resolves to the local a, and then the
search is stopped.
Ok, I think I got it. It's probably the same reason why in
---
procedure Foo (const A : My_Type); overload;
proce
Op Fri, 18 Jan 2008, schreef Vinzent Höfler:
Maybe my view is skewed too much by the use of Ada where even a function
declares a "record identifier". In Ada it is even possible to do:
---
procedure Test is
X : Integer;
procedure B is
X : Integer;
begin
X := 1;
Tes
Daniël Mantione wrote:
Op Fri, 18 Jan 2008, schreef Vinzent Hoefler:
On Friday 18 January 2008 16:04, Michael Van Canneyt wrote:
On Fri, 18 Jan 2008, Daniël Mantione wrote:
Op Fri, 18 Jan 2008, schreef Michael Van Canneyt:
To the user, it may appear as a bunch of dots. To the compiler,
it d
If you request for features please come up with something realistic and also
provide good
information how it then should work. E.g. provide grammar how the syntax and
semantics work. And
if it is for compatibility you should also be able to provide real pascal
examples that show how
ambigious c
> On Friday 18 January 2008 15:50, Michael Van Canneyt wrote:
> >
> > Of course not:
> >
> > tell me, what does a.b.c.d mean if you have a record a with field b,
> > and you have a uses a.b.c in your uses clause ?
>
> The magic word would be "scope" here. It's the same as with using two
> differe
On 18 Jan 2008, at 16:35, Marco van de Voort wrote:
The magic word would be "scope" here. It's the same as with using two
different units including the same identifier twice.
Yes and no, of course it will work, but might be counterintuitive.
uses x, a.b.c;
a.b.c.d.
if x also contains an id
On Friday 18 January 2008 16:04, Michael Van Canneyt wrote:
> On Fri, 18 Jan 2008, Daniël Mantione wrote:
> > Op Fri, 18 Jan 2008, schreef Michael Van Canneyt:
> > > To the user, it may appear as a bunch of dots. To the compiler,
> > > it doesn't know how to map the a.b.c.d:
> >
> > Well, with norm
Op Fri, 18 Jan 2008, schreef Vinzent Hoefler:
On Friday 18 January 2008 16:04, Michael Van Canneyt wrote:
On Fri, 18 Jan 2008, Daniël Mantione wrote:
Op Fri, 18 Jan 2008, schreef Michael Van Canneyt:
To the user, it may appear as a bunch of dots. To the compiler,
it doesn't know how to map
On Fri, 18 Jan 2008, Vinzent Hoefler wrote:
> On Friday 18 January 2008 16:04, Michael Van Canneyt wrote:
> > On Fri, 18 Jan 2008, Daniël Mantione wrote:
> > > Op Fri, 18 Jan 2008, schreef Michael Van Canneyt:
> > > > To the user, it may appear as a bunch of dots. To the compiler,
> > > > it doe
On Fri, 18 Jan 2008, Vinzent Hoefler wrote:
> On Friday 18 January 2008 15:50, Michael Van Canneyt wrote:
> > On Fri, 18 Jan 2008, Vinzent Hoefler wrote:
> > > On Friday 18 January 2008 15:19, Michael Van Canneyt wrote:
> > > > > I saw this week a CodeGear Guy in a cg ng talking about that.
> >
On Friday 18 January 2008 15:50, Michael Van Canneyt wrote:
> On Fri, 18 Jan 2008, Vinzent Hoefler wrote:
> > On Friday 18 January 2008 15:19, Michael Van Canneyt wrote:
> > > > I saw this week a CodeGear Guy in a cg ng talking about that.
> > > > In Win32 its is Just dots in the name, nothing else
Op Fri, 18 Jan 2008, schreef Michael Van Canneyt:
On Fri, 18 Jan 2008, Daniël Mantione wrote:
Op Fri, 18 Jan 2008, schreef Michael Van Canneyt:
To the user, it may appear as a bunch of dots. To the compiler, it doesn't
know how to map the a.b.c.d:
Well, with normal Pascal rules, you
On Fri, 18 Jan 2008, Daniël Mantione wrote:
>
>
> Op Fri, 18 Jan 2008, schreef Michael Van Canneyt:
>
> > To the user, it may appear as a bunch of dots. To the compiler, it doesn't
> > know how to map the a.b.c.d:
>
> Well, with normal Pascal rules, you cannot declare a variable with the sam
Op Fri, 18 Jan 2008, schreef Michael Van Canneyt:
To the user, it may appear as a bunch of dots. To the compiler, it doesn't
know how to map the a.b.c.d:
Well, with normal Pascal rules, you cannot declare a variable with the
same name as a unit you use, because a unit is also an identifier.
> On Fri, 18 Jan 2008, Vinzent Hoefler wrote:
>
> > On Friday 18 January 2008 15:19, Michael Van Canneyt wrote:
> >
> > > > I saw this week a CodeGear Guy in a cg ng talking about that.
> > > > In Win32 its is Just dots in the name, nothing else.
> so
>
> unit a.b.c;
On Fri, 18 Jan 2008, Vinzent Hoefler wrote:
> On Friday 18 January 2008 15:19, Michael Van Canneyt wrote:
>
> > > I saw this week a CodeGear Guy in a cg ng talking about that.
> > > In Win32 its is Just dots in the name, nothing else.
> >
> > If he said that, he is totally braindead and doesn't
On Friday 18 January 2008 15:19, Michael Van Canneyt wrote:
> > I saw this week a CodeGear Guy in a cg ng talking about that.
> > In Win32 its is Just dots in the name, nothing else.
>
> If he said that, he is totally braindead and doesn't have a clue
> about what he is talking.
Well, the discuss
> > - Can someone provide the grammar how an identifier looks like in
Delphi?
> > - How shall the compiler detect that "a.b" is an unit if a is also
defined
> as a record that
> > doesn't contain a field b?
> > - How shall the compiler handle if "a.b.c" is an unit and a.b.c is
class?
> >
> > So p
On Fri, 18 Jan 2008, Cesar Liws Gmail wrote:
>
>
> -Mensagem original-
> De: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Em nome de Marco van de
> Voort
> Enviada em: sexta-feira, 18 de janeiro de 2008 06:05
> Para: FPC-Pascal users discussions
> Assunto:
-Mensagem original-
De: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Em nome de Marco van de
Voort
Enviada em: sexta-feira, 18 de janeiro de 2008 06:05
Para: FPC-Pascal users discussions
Assunto: Re: [fpc-pascal] dot within unit file name
> - Can someone provide the grammar how
On Friday 18 January 2008 15:05, Marco van de Voort wrote:
> More over it should map one to one to what Delphi does, since it is a
> compability item.
And then - IMO - it's useless and indeed ".NET crap". Not worth the
trouble.
Vinzent.
___
fpc-pascal
On Friday 18 January 2008 14:56, Matt Emson wrote:
> I would say, remove "unit" replace with "Namespace" and all would be
> fine.
And the same as before, just with a different syntax.
Vinzent.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.o
> - Can someone provide the grammar how an identifier looks like in Delphi?
> - How shall the compiler detect that "a.b" is an unit if a is also defined as
> a record that
> doesn't contain a field b?
> - How shall the compiler handle if "a.b.c" is an unit and a.b.c is class?
>
> So please come w
> Marco van de Voort wrote:
> >>
> >
> > And if I import "blah" what would be imported? As far as I can see this is
> > no real advantage, except allowing dots in unitnames
> >
>
> No, you would import "MyAPI.Blah"...
Well, that means you don't really have a namespace system, just dots in
If you request for features please come up with something realistic and also
provide good
information how it then should work. E.g. provide grammar how the syntax and
semantics work. And
if it is for compatibility you should also be able to provide real pascal
examples that show how
ambigious co
Marco van de Voort wrote:
Michael Fuchs wrote:
But how can fpc find the unit which contains this namespace? I think
better is: Namespace = unit name = file name
It is easier to allow a dot in the unit name than writing code, which
search all units for the right naemspace.
The fil
Marco van de Voort wrote:
However again, as far as I understand partial classes (Class
Helpers in Delphi.NET), for this you need a registration system again because
you need
to compile all units that might use class X so that they auto import all
units with classhelpers for unit X. (or you have
> Michael Fuchs wrote:
> > But how can fpc find the unit which contains this namespace? I think
> > better is: Namespace = unit name = file name
> > It is easier to allow a dot in the unit name than writing code, which
> > search all units for the right naemspace.
> >
>
> The filename would be "
I think if sb would waste time on it, and the patch is good quality it might
be added. Not because it is a good feature (afaik it is not), but out of
Delphi compat.
Good or bad is relative. FPC is about development tool, each user has
he's own good or bad way of programming. The more features
> Michael Van Canneyt wrote:
> > On Fri, 18 Jan 2008, Matt Emson wrote:
> > What is the difference ?
> > The second one saves on typing, which is a plus in my book ?
> >
> Right.. confusion over verbosity. Given two units called
> "Constants.pas", which one is the correct unit?
Give two the s
On Friday 18 January 2008 14:06, Bee wrote:
> The more features it has, the better for the users.
No. It's more like:
The nice thing about standards is that you have so many to choose from.
-- Andrew S. Tanenbaum
(And yes, that was meant ironically.)
Vinzent.
___
On Friday 18 January 2008 13:22, Matt Emson wrote:
> Vinzent Hoefler wrote:
> > On Friday 18 January 2008 12:35, Bee wrote:
> >
> > Namespaces are too flat and simply not powerful enough to justify
> > the implementation and maintenance effort.
>
> And units are better because...?
*Child* units ar
unit name = file name
That's it. It's enough for me. Let the dot as part of the file name.
That's all. :-D
-Bee-
has Bee.ography at:
http://beeography.wordpress.com
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal
Michael Fuchs wrote:
But how can fpc find the unit which contains this namespace? I think
better is: Namespace = unit name = file name
It is easier to allow a dot in the unit name than writing code, which
search all units for the right naemspace.
The filename would be "MyAPI.Blah.pas" as you
Matt Emson schrieb:
Turning it on its head - file names should have nothing to do with unit
names. The unit lives in a namespace, The namespace directive gives the
path to the unit. so it would be:
unit Blah;
namespace MyAPI
and
uses MyAPI.Blah;
But how can fpc find the unit which contai
Michael Van Canneyt wrote:
On Fri, 18 Jan 2008, Matt Emson wrote:
What is the difference ?
The second one saves on typing, which is a plus in my book ?
Right.. confusion over verbosity. Given two units called
"Constants.pas", which one is the correct unit? Given a unit called
"Utils.pa
> > Well, the statements so far went like "this sub.sub.unit stuff is
> > just .NET crap, we won't implement any of those". ;)
>
> I don't like that kind of attitude either. .Net is not crap as a whole,
> it does have some good features and ability. If some of them are really
> good, then why n
Michael Van Canneyt schrieb:
unit Blah;
Namespace MyAPI.Blah;
And how will you know which namespace is in what unit (or file) ?
You then need a second structure mapping namespaces on filenames, making it
slower, bulkier and error prone. The cure is worse than the disease, IMHO.
You are righ
On Fri, 18 Jan 2008, Matt Emson wrote:
> Vinzent Hoefler wrote:
> > On Friday 18 January 2008 12:35, Bee wrote:
> > Namespaces are too flat and simply not powerful enough to justify the
> > implementation and maintenance effort.
>
> And units are better because...?
>
> I would take Namespace
Daniël Mantione wrote:
Op Fri, 18 Jan 2008, schreef Bee:
Both compilers [CAN] use the UCSD Pascal unit system,
I have added a missing word from that statement I think.
which, as of today is still one of the best modular programming
systems. That is the base to start from.
No, no it is not
Vinzent Hoefler wrote:
On Friday 18 January 2008 12:35, Bee wrote:
Namespaces are too flat and simply not powerful enough to justify the
implementation and maintenance effort.
And units are better because...?
I would take Namespaces over the crippled '80's unit notation any day.
Units com
Op Fri, 18 Jan 2008, schreef Bee:
I don't use .Net, but supporting Delphi dot namespace doesn't need to stop
providing other functionality. Ideally, we should able to provide them both,
the Delphi way and the FPC way. Both are the most used pascal compiler
nowadays. ;)
As far as I am conce
Agreed, but, many things in .NET interfere with how things work in
Pascal. The .NET way of modular programming is totally different
compared with the Pascal unit system, therefore it would function as an
"alien".
I came from Delphi (my last Delphi is the Turbo Delphi) before I switch
totally
On Friday 18 January 2008 12:35, Bee wrote:
> > Well, the statements so far went like "this sub.sub.unit stuff is
> > just .NET crap, we won't implement any of those". ;)
>
> I don't like that kind of attitude either. .Net is not crap as a
> whole, it does have some good features and ability.
Yeah
Op Fri, 18 Jan 2008, schreef Bee:
Well, the statements so far went like "this sub.sub.unit stuff is just .NET
crap, we won't implement any of those". ;)
I don't like that kind of attitude either. .Net is not crap as a whole, it
does have some good features and ability. If some of them are r
Well, the statements so far went like "this sub.sub.unit stuff is
just .NET crap, we won't implement any of those". ;)
I don't like that kind of attitude either. .Net is not crap as a whole,
it does have some good features and ability. If some of them are really
good, then why not implement so
On Jan 18, 2008, at 12:16 PM, Bee wrote:
And yes, I'd like to have implemented that ("child units") in FPC.
What is child unit?
http://www.adaic.com/docs/95style/html/sec_4/4-1-1.html
--
Damien Gerard
[EMAIL PROTECTED]
Le temps n'a pas d'importance. Seul le code est important
-- (f0
The more important: What would the user gain from it?
I could gain my old bad habit again. LOL :-D
So, as far as I am concerned, putting effort into the development of
such flat namespaces - which, while enforced by the developer only, are
already there, but using underscores instead of dots
On Friday 18 January 2008 12:16, Michael Fuchs wrote:
> Vinzent Hoefler schrieb:
> >> I think more interesting are dots in unit name for making better
> >> namespaces.
> >
> > Actually, I'm thinking "child units".
>
> You mean like in Ada? Yes, this would be great.
> Are there any plans to implemen
On Friday 18 January 2008 12:17, Matt Emson wrote:
> Vinzent Hoefler wrote:
> > But even so, it still wouldn't help Bee, because he's not using it
> > for namespaces, he's using it as special names for version control.
> > This was the part I was attacking, if anyone else wondered.
>
> No problem,
On Friday 18 January 2008 12:07, Michael Van Canneyt wrote:
>It doesn't take a lot of intelligence to see that if unitname can
>containe one (or more) dots, this mechanism becomes suddenly a lot
> harder because your unitname may, by accident, match
> unitname.identifier1 of a symbol in an
On Fri, 18 Jan 2008, Bee wrote:
> > For clarity: I am not against this dot by itself. I can only assure you, if
> > implemented, that it will not end up in 2.2.2.
> >
> > As for implementing this feature: this is not so trivial as one might think.
> >
> > 1. The parser needs changing. That's p
For clarity: I am not against this dot by itself. I can only assure you, if
implemented, that it will not end up in 2.2.2.
As for implementing this feature: this is not so trivial as one might think.
1. The parser needs changing. That's probably the easy part.
2. Symbol lookups need changing. T
Vinzent Hoefler wrote:
But even so, it still wouldn't help Bee, because he's not using it for
namespaces, he's using it as special names for version control. This
was the part I was attacking, if anyone else wondered.
No problem, I just didn't get that from the glib "you should learn how
t
And yes, I'd like to have implemented that ("child units") in FPC.
What is child unit?
But even so, it still wouldn't help Bee, because he's not using it for
namespaces, he's using it as special names for version control. This
was the part I was attacking, if anyone else wondered.
It's alri
Vinzent Hoefler schrieb:
I think more interesting are dots in unit name for making better
namespaces.
Actually, I'm thinking "child units".
You mean like in Ada? Yes, this would be great.
Are there any plans to implement this in future versions?
Micha
On Friday 18 January 2008 11:44, ik wrote:
> Personally I do not want to see this feature in Pascal, because it
> will just complicate things, because there is a use for dot in the
> Pascal language...
Think "records".
If you can have "unit.identifier.record_field" ad infinitum (any record
may
On Jan 18, 2008, at 11:16 AM, Bee wrote:
Hi all,
Why cant FPC use unit that has (some) dot(s) within the file name?
Can FPC support it in the next release (2.2.2)?
I think the dot is used in the grammar.
for example :
unit foo;
interface
procedure Print;
implementation
[...]
end.
You
On Fri, 18 Jan 2008, Bee wrote:
> > Use an underscore.
>
> Ok, I need to learn a new habit then. I can live with that. Thanks, Michael.
> :)
For clarity: I am not against this dot by itself. I can only assure you, if
implemented, that it will not end up in 2.2.2.
As for implementing this feat
On Friday 18 January 2008 12:01, Matt Emson wrote:
> Vinzent Hoefler wrote:
> > On Friday 18 January 2008 11:39, Bee wrote:
> >> I used to use this feature on Turbo Delphi Explorer. But since I
> >> totally switch to FPC/Laz and Ubuntu, I really missed this feature
> >> on FPC. :(
> >
> > No offens
Use an underscore.
Ok, I need to learn a new habit then. I can live with that. Thanks,
Michael. :)
-Bee-
has Bee.ography at:
http://beeography.wordpress.com
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/ma
Vinzent Hoefler wrote:
On Friday 18 January 2008 11:39, Bee wrote:
I used to use this feature on Turbo Delphi Explorer. But since I
totally switch to FPC/Laz and Ubuntu, I really missed this feature on
FPC. :(
No offense, but maybe this is a good time to start becoming a serious
deve
No offense, but maybe this is a good time to start becoming a serious
developer now?
No offense, but maybe this is a good time to start providing a serious
namespace to FPC now? ;)
-Bee-
has Bee.ography at:
http://beeography.wordpress.com
___
fpc-
On Friday 18 January 2008 11:48, Michael Fuchs wrote:
> Bee schrieb:
> > Why cant FPC use unit that has (some) dot(s) within the file name?
> > Can FPC support it in the next release (2.2.2)?
>
> I think more interesting are dots in unit name for making better
> namespaces.
Actually, I'm thinking
Personally I do not want to see this feature in Pascal, because it
will just complicate things, because there is a use for dot in the
Pascal language...
Feature is feature, you may use it, if you like, you may not, if you
don't. Doesn't need to make yourself got complicated. ;)
It's like the
On Friday 18 January 2008 11:39, Bee wrote:
> I used to use this feature on Turbo Delphi Explorer. But since I
> totally switch to FPC/Laz and Ubuntu, I really missed this feature on
> FPC. :(
No offense, but maybe this is a good time to start becoming a serious
developer now?
Vinzent.
___
On Friday 18 January 2008 11:34, Bee wrote:
> For some reasons, sometimes version control is too bloated,
> especially when the project is not too big.
I used RCS on 2K SLOC projects years ago already and never found it to
be "too bloated". No, I could actually look at the change log and diffs
Bee schrieb:
Why cant FPC use unit that has (some) dot(s) within the file name? Can
FPC support it in the next release (2.2.2)?
I think more interesting are dots in unit name for making better namespaces.
If I have a class called TSpecialButton, I want a unit name like
"Michael.GUI.Buttons.TS
On Jan 18, 2008 12:34 PM, Bee <[EMAIL PROTECTED]> wrote:
> > Probably not. And if at all, it wouldn't accomplish what you want to do.
>
> If someone would provide a patch for this, is it gonna be accepted? If
> not, may I know what the reason(s)? ;)
unit_name.function () ...
...
How would you
I think the dot is used in the grammar.
I understand.
You want to be able to call foo.Print; and you can not make the
difference between a dot for the filename and a dot as a separator.
I believe the compiler has some kind of unit list. Compiler should know
the difference using some kind o
Probably not. And if at all, it wouldn't accomplish what you want to do.
If someone would provide a patch for this, is it gonna be accepted? If
not, may I know what the reason(s)? ;)
Then use the branch/switch feature of your favourite version control
system. That's one thing it was designed
On Friday 18 January 2008 11:16, Bee wrote:
> Why cant FPC use unit that has (some) dot(s) within the file name?
> Can FPC support it in the next release (2.2.2)?
Probably not. And if at all, it wouldn't accomplish what you want to do.
> Sometimes I need to have some units for example: unit1.ori
On Fri, 18 Jan 2008, Bee wrote:
> Hi all,
>
> Why cant FPC use unit that has (some) dot(s) within the file name? Can FPC
> support it in the next release (2.2.2)?
No.
>
> Sometimes I need to have some units for example: unit1.ori.pas and
> unit1.modif.pas, which I need to switch to one of th
Hi all,
Why cant FPC use unit that has (some) dot(s) within the file name? Can
FPC support it in the next release (2.2.2)?
Sometimes I need to have some units for example: unit1.ori.pas and
unit1.modif.pas, which I need to switch to one of them but never use
them both.
TIA.
-Bee-
has Bee
80 matches
Mail list logo