Hi,
Thank you for the answers!
> > The FPC wiki states that the ppu file stores all the tokens for the
> generic classes. Browsing the source of compiler/symdef.pas (r31298) also
> gave me this impression. Does it mean that a recompilation occurs for every
> specialization?
>
> Not for every spec
Am 25.08.2015 08:34 schrieb "Jani Mátyás" :
> The FPC wiki states that the ppu file stores all the tokens for the
generic classes. Browsing the source of compiler/symdef.pas (r31298) also
gave me this impression. Does it mean that a recompilation occurs for every
specialization?
Not for every spec
Hi All,
I have some questions regarding FPC's generics implementation, just out of
curiosity.
The FPC wiki states that the ppu file stores all the tokens for the generic
classes. Browsing the source of compiler/symdef.pas (r31298) also gave me
this impression. Does it mean that a recompilation oc
Bisma Jayadi schrieb:
>> I think it is useful, because it allows future language extensions to
>> also use the <> syntax without conflicting with generics (e.g., the
>> Objective Pascal draft syntax also makes use of angle brackets for a
>> couple of things).
>
> Then my second syntax proposal mig
I think it is useful, because it allows future language extensions to
also use the <> syntax without conflicting with generics (e.g., the
Objective Pascal draft syntax also makes use of angle brackets for a
couple of things).
Then my second syntax proposal might overcome possible conflict with
Bisma Jayadi schrieb:
> Hi all,
> Any comments?
We tried to do it keeping the spirit of pascal in mind. The array in an
array declaration is also useless, you could do
type
a : integer[0..100];
Using generic is verbose but imo one defines seldomly generic types so
it is ok because it improves r
type
TRegularIntegerArray: array[0..100] of integer;
TGenericArray: array[0..100] of T;
var
IntegerArrayFromGeneric = specialize TGenericArray;
Yes, I know, the ':' and '=' usage is wrong, it's a mistypo. :-D
Anyway, using my suggested generic syntax(es), it's allowed to specialize a
ge
On 13 jun 2007, at 13:35, Bisma Jayadi wrote:
FPC uses 2 keywords for generics: "generic" for generic definition
block, and "specialize" for generic type implementation. I think
the "generic" keyword is quite redundant
I think it is useful, because it allows future language extensions to
Hi all,
FPC uses 2 keywords for generics: "generic" for generic definition block, and
"specialize" for generic type implementation. I think the "generic" keyword is
quite redundant, useless, and too verbose since generics already use pair of <>
to define a generics type. Generics definition sh