Daniël Mantione wrote:
Op Thu, 3 Nov 2005, schreef Mattias Gaertner:
Here is a proposal of the syntax:
type
TGenericClassT,F = class
public
procedure Add(Item: T; Flag: F);
end;
This syntax is almost impossible to implement since in one of your other
mails the symbols to mark the
Daniël Mantione wrote:
Op Thu, 3 Nov 2005, schreef Mattias Gaertner:
Here is a proposal of the syntax:
type
TGenericClassT,F = class
public
procedure Add(Item: T; Flag: F);
end;
This syntax is almost impossible to implement since in one of your other
mails the symbols to
On Fri, 04 Nov 2005 10:47:42 +0100
Marc Weustink [EMAIL PROTECTED] wrote:
Daniël Mantione wrote:
Op Thu, 3 Nov 2005, schreef Mattias Gaertner:
Here is a proposal of the syntax:
type
TGenericClassT,F = class
public
procedure Add(Item: T; Flag: F);
end;
This
Marc Weustink wrote:
BTW,
what woud be the problem with
type
TMySpecificClass = TGenericClass(TObject, Integer);
Or:
code
type
TGenericCollection = generic(T: TCollectionItem) class(TComponent)
...implement TCollection and use T
end;
TCollection = TGenericCollection of
On Fri, 04 Nov 2005 13:44:55 +0100
Marc Weustink [EMAIL PROTECTED] wrote:
Mattias Gaertner wrote:
On Fri, 04 Nov 2005 10:47:42 +0100
Marc Weustink [EMAIL PROTECTED] wrote:
Daniël Mantione wrote:
Op Thu, 3 Nov 2005, schreef Mattias Gaertner:
Here is a proposal of the syntax:
Micha Nelissen wrote:
Marc Weustink wrote:
BTW,
what woud be the problem with
type
TMySpecificClass = TGenericClass(TObject, Integer);
Or:
code
type
TGenericCollection = generic(T: TCollectionItem) class(TComponent)
...implement TCollection and use T
end;
TCollection =
Example:
procedure MyProc(T); // generic procedure without parameters
ver i: T;
begin
...
end;
procedure MyProc(T: TClass); // non generic procedure
begin
end;
Call
MyProc(TObject);
What will happen?
Mattias
Sky will reign fire:
procedure (var T);
begin
// generic or not??
end;
Ales Katona wrote:
Micha Nelissen wrote:
Marc Weustink wrote:
BTW,
what woud be the problem with
type
TMySpecificClass = TGenericClass(TObject, Integer);
Or:
code
type
TGenericCollection = generic(T: TCollectionItem) class(TComponent)
...implement TCollection and use T
end;
Micha Nelissen wrote:
code
type
TGenericCollection = generic(T: TCollectionItem) class(TComponent)
...implement TCollection and use T
end;
TCollection = TGenericCollection of (TCollectionItem);
TFieldDefs = TGenericCollection of (TFieldDef);
/code
So generic procs could look like:
On Friday 04 November 2005 13:00, Micha Nelissen wrote:
Combining some of the wiki ideas, and has no evil characters
:-).
I don't understand the fuzz about using . It's not even close to
being C(++)-ish, because it was used for describing discrete range
types _at least_ in Ada's generics
Mattias Gaertner wrote:
On Fri, 04 Nov 2005 13:44:55 +0100
Marc Weustink [EMAIL PROTECTED] wrote:
Mattias Gaertner wrote:
On Fri, 04 Nov 2005 10:47:42 +0100
Marc Weustink [EMAIL PROTECTED] wrote:
Daniël Mantione wrote:
Op Thu, 3 Nov 2005, schreef Mattias Gaertner:
Here is a
types _at least_ in Ada's generics back in 1983[*] already.
Perhaps someone should take a look at those, because these are also
quite different from C++-templates.
Vinzent.
[*] That would be the same year the term C++ just appeared first in
history of programming languages then, and
Micha Nelissen wrote:
code
type
TGenericCollection = generic(T: TCollectionItem) class(TComponent)
...implement TCollection and use T
end;
TCollection = TGenericCollection of (TCollectionItem);
TFieldDefs = TGenericCollection of (TFieldDef);
/code
So generic procs could look
On Friday 04 November 2005 13:27, Marco van de Voort wrote:
[]
The evil is in
- using characters instead of modifiers.
- worse, recycling already used characters.
Alright, I completely understand at least the first part, so perhaps
they should simply not be overused. :-)
Just for the fun
Peter Vreman wrote:
Expiriment, feed g++ code with errors in the statements. With macro's
those errors won't be show until the macro is used. But with templates
this is diffent:
Smart indeed :)
This is more important than the syntactical sugar. The rules where to
declare generics and
Here is a proposal of the syntax:
type
TGenericClassT,F = class
public
procedure Add(Item: T; Flag: F);
end;
procedure TGenericClass.Add(Item: T; Flag: F);
// Note: No redundant T,F after TGenericClass.
begin
end;
I think, the parameters should be at the identifier name, not in the
On Thu, 3 Nov 2005 19:59:40 +0100 (CET)
Daniël Mantione [EMAIL PROTECTED] wrote:
Op Thu, 3 Nov 2005, schreef Mattias Gaertner:
Here is a proposal of the syntax:
type
TGenericClassT,F = class
public
procedure Add(Item: T; Flag: F);
end;
This syntax is almost
On Thu, 3 Nov 2005 20:10:35 +0100
Mattias Gaertner [EMAIL PROTECTED] wrote:
On Thu, 3 Nov 2005 19:59:40 +0100 (CET)
Daniël Mantione [EMAIL PROTECTED] wrote:
Op Thu, 3 Nov 2005, schreef Mattias Gaertner:
Here is a proposal of the syntax:
type
TGenericClassT,F =
Op Thu, 3 Nov 2005, schreef Mattias Gaertner:
Right. I didn't think of that.
What about edged brackets?
type
TGenericClass[T,F] = class
public
procedure Add(Item: T; Flag: F);
end;
At first sight it looks okay. If necessary it is possible to introduce a
two character
On Thu, 3 Nov 2005 20:25:07 +0100 (CET)
Daniël Mantione [EMAIL PROTECTED] wrote:
Op Thu, 3 Nov 2005, schreef Mattias Gaertner:
Right. I didn't think of that.
What about edged brackets?
type
TGenericClass[T,F] = class
public
procedure Add(Item: T; Flag: F);
On Thu, 03 Nov 2005 22:35:34 +0100
Peter Vreman [EMAIL PROTECTED] wrote:
At 20:41 3-11-2005, you wrote:
On Thu, 3 Nov 2005 20:25:07 +0100 (CET)
Daniël Mantione [EMAIL PROTECTED] wrote:
Op Thu, 3 Nov 2005, schreef Mattias Gaertner:
Right. I didn't think of that.
What
21 matches
Mail list logo