Re: [fpc-pascal] FPC's generics implementation

2015-08-25 Thread Jani Mátyás
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

Re: [fpc-pascal] FPC's generics implementation

2015-08-25 Thread Sven Barth
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

[fpc-pascal] FPC's generics implementation

2015-08-24 Thread Jani Mátyás
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

Re: [fpc-pascal] FPC's generics

2007-06-13 Thread Florian Klaempfl
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

Re: [fpc-pascal] FPC's generics

2007-06-13 Thread Bisma Jayadi
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

Re: [fpc-pascal] FPC's generics

2007-06-13 Thread Florian Klaempfl
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

Re: [fpc-pascal] FPC's generics

2007-06-13 Thread Bisma Jayadi
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

Re: [fpc-pascal] FPC's generics

2007-06-13 Thread Jonas Maebe
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

[fpc-pascal] FPC's generics

2007-06-13 Thread Bisma Jayadi
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