[fpc-devel] Re: [fpc-l] type discussion
Peter Vreman
peter at freepascal.org
Wed Jun 1 14:08:31 CEST 2005
> I followed this discussion if that construction (see below) should be
> allowed or not (I think it should be allowed, but it's possible to live
> without it; I can imagine situations where it could make easier to read),
> and I'm missing a bit a discussion forum about the future of FPC. It
> should
> contain what is planned to be implemented, it should contain about ideas
> of
> what could be implemented.
See below
> I've read somewhere that Delphi 7 compatibility is planned (since I do not
> have it I do not know what that means in detail).
>
> Beside of compatibility towards Delphi or MacPascal or others FPC should
> be
> open to other modifications/extensions (maybe Delphi one day copies FC a
> bt
> :-), and not always the other way round)
Don't expect anything. Like assigning values to enumarations we had it
already before Delphi did. And also with inlining they added other rules.
> Useful extensions I would see:
>
> bigger sets: set of -100000..100000 (e.g.)
>
> a way to write integer constants in any base, not only
> binary/octal/hexadecimal (not so important, but easy to implement)
You can write your own routine for that.
> writing of enums to text file;
Enums are like constant numbers. You can already write them to a file
using a typecast: writeln(longint(enum));
> more operators which can be overloaded (should follow the ALGOL68 rules)
>
> the C-style operators += etc. should better be written as +:= since C has
> =
> as assignment, Pascal has := as assignment symbol
This will break existing code. And IMHO it looks very strange with the
colon in the middle.
> automatic assignment operators:
>
> operator * ( a : type1 ; b : type2 ) : type1
>
> should automatically permit constructions like:
>
> var
> x : type1, y : type2 ;
>
> x *:= y ;
>
> multiple assignments:
>
> a := b := c := d := 0 ;
This was in the compiler in the past and caused a lot of trouble and hacks
in the parser.
> That are just some ideas. Maybe there are more?
But are they usefull? Do they add something or only save you typing? THat
is why there is no discussion about future on the webpages. Discussion
shall take place at the mailing lists.
More information about the fpc-devel
mailing list