On Jan 18, 2008 12:34 PM, Bee <[hidden email]> 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 coap with this situation if you'll have "." inside ?
You can translate it into "_", yes, or you can just use underscore at
the file name at the first place...
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
> > Then use the branch/switch feature of your favourite version control
> > system. That's one thing it was designed for.
> For some reasons, sometimes version control is too bloated, especially
> when the project is not too big. Nevertheless, it's the easiest way to
> have "manual" version control. :D
> has Bee.ography at:
> http://beeography.wordpress.com >
> 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
from weeks ago and see why the code was broken now.
> Nevertheless, it's the
> easiest way to have "manual" version control. :D
And about the most error-prone. Believe me, I speak from experience.
One of my co-workers used "manual" version control by renaming and
moving files around (and even now his code is on SVN, he still does
it - bad habits die hard, I guess).
No joke, but there was not one single version he had given me as "the
latest" which actually matched his "tested" development copy. Despite
all his effort, there were always "differences" and "bugs he already
fixed" appearing at the beta test site once I installed "the exact same
copy" of his development tree from his PC.
 I'd rather be lazy than spending hours and hours finding out what
the hell went wrong. After all, my laziness lend me to believe that
software developer is the right profession for me. And so far, it
worked out for me. :)
fpc-pascal maillist - [hidden email] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> 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 '='. It does not always mean 'equal' as you have to use it
on type declaration *and* comparison. It's like the 'end'. It does not
always need to have 'begin' since 'case' and 'try' can also have an
'end'. Etc. :)
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
Actually, I'm thinking "child units".
"Namespaces" don't even have the appropriate scoping rules. The Java
language's package is a perfect example for that: No matter where you
put the class, it only sees it's own package. There they missed a
perfect opportunity to enforce scoping rules with the compiler instead
of letting the programmer decide it all over again just like they did
back in the 70s, where all programs were written in FORTRAN and never
crossed the 1023 lines of code boundary. ;)
> 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?
I think you are missing the point. Bee may indeed be misguided, but the
feature is in Delphi[.Net] in general. It is used to implement
Namespaces - something sadly lacking in the FPC dialect of Pascal. Maybe
it is time *you* embraced modern programming techniques? I, for one,
would rate Namespaces over templates and generics. I use them daily.
Give me partial classes too (i.e. OO modular design.)
> > 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 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. This is the hard part, because you must be
able to handle correctly unitname.identifier.identifier2.identifier3
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 another unit.
And doing all this in a way that doesn't change current behaviour...
Not something you can do in a day, if you ask me.
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 offense, but maybe this is a good time to start becoming a
> > serious developer now?
> I think you are missing the point.
No, I don't.
> Bee may indeed be misguided, but
> the feature is in Delphi[.Net] in general.
Screw Delphi. That "feature" was in ISO-standardized Ada back in 1995
already. And there it's called child units. Name spaces have too flat
scoping rules to be really useful.
And yes, I'd like to have implemented that ("child units") in FPC.
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.
>> I think more interesting are dots in unit name for making better
> 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?