Hi,
I'm trying to add support for generics (templates) to fpc.
Do we want to have a "generics" section (like "interface",
"implementation") or do we want a special source code type (like "unit",
"program") in the source code ?
I'm tending to a special source code type "generic unit".
The generi
It isn't clear to me what the current status about Generics is:
http://www.freepascal.org/wiki/index.php/Generics
Are they Delphi conform (.net2)? What's planned? Can somebody explain?
___
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://li
Will fpc support generic record declarations like this:
type
generic TFixedKeyNode = record
key: array[0..KeySize-1] of char;
value: dword;
end;
In other word the type is not parameterized by another type but by an integer used
to define the upper limit of an array.
I am thinking
Hi All,
I'm looking for a guide (for people that have slow learning curves
like me ;)) regarding understanding generics, and the ability to start
using them.
Thanks,
Ido
--
http://ik.homelinux.org/
___
fpc-devel maillist - fpc-devel@lists.freepasca
What is the state and future plans of generics?
I only found the wiki page
http://wiki.lazarus.freepascal.org/Generics
which does not even mention the current syntax.
Mattias
___
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.free
Hi,
is there a chance to merge the generics collections 34229 commit from
trunk to 3.0 fixes ( a.k.a. 3.0.2 soon to be ) also ?
regards,
--
Dimitrios Chr. Ioannidis
___
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.o
On Wed, 2009-10-21 at 15:54 +0200, Jonas Maebe wrote:
> On 21 Oct 2009, at 14:55, Marco van de Voort wrote:
>
> Generics still don't work 100%,
>
>
> Jonas
>
In what way is Generics not 100%?
Dave Copeland.
___
fpc-devel maillist - fpc-devel@
On Thu, Oct 22, 2009 at 04:08, David B Copeland
wrote:
> In what way is Generics not 100%?
>
> Dave Copeland.
For me at least, the gravest problem is a lack of function-level generics.
--
Alexander S. Klenin
___
fpc-devel maillist - fpc-devel@lists.
On 21 Oct 2009, at 19:08, David B Copeland wrote:
On Wed, 2009-10-21 at 15:54 +0200, Jonas Maebe wrote:
Generics still don't work 100%,
In what way is Generics not 100%?
There are problems with using inheritance, e.g. http://bugs.freepascal.org/view.php?id=12249
and http://svn.freepascal
I've just encountered a generics problem and wanted to know if it was
intentional...
uGenerics.pas
generic GObjectList<_T>=class(TList)
private
FIndex : integer;
private
function Get(Index:integer): _T;
procedure Put(Index:integer; Item:_T);
public
constructor
further infos:
http://qc.borland.com/wc/qcmain.aspx?d=11168
Danny Milosavljevic wrote:
Hi,
I'm trying to add support for generics (templates) to fpc.
Do we want to have a "generics" section (like "interface",
"implementation") or do we want a special source code type (like "unit",
"program") in th
> Hi,
>
> I'm trying to add support for generics (templates) to fpc.
>
> Do we want to have a "generics" section (like "interface",
> "implementation") or do we want a special source code type (like "unit",
> "program") in the source code ?
>
> I'm tending to a special source code type "generic uni
Hi,
Am Donnerstag, den 28.04.2005, 07:53 +0200 schrieb Peter Vreman:
> > Hi,
> >
> > I'm trying to add support for generics (templates) to fpc.
> >
> > Do we want to have a "generics" section (like "interface",
> > "implementation") or do we want a special source code type (like "unit",
> > "progr
At 18:06 29-4-2005, you wrote:
Hi,
Am Donnerstag, den 28.04.2005, 07:53 +0200 schrieb Peter Vreman:
> > Hi,
> >
> > I'm trying to add support for generics (templates) to fpc.
> >
> > Do we want to have a "generics" section (like "interface",
> > "implementation") or do we want a special source code
hi,
Am Freitag, den 29.04.2005, 21:48 +0200 schrieb Peter Vreman:
> At 18:06 29-4-2005, you wrote:
> >Hi,
> >
> >Am Donnerstag, den 28.04.2005, 07:53 +0200 schrieb Peter Vreman:
> > > > Hi,
> > > >
> > > > I'm trying to add support for generics (templates) to fpc.
> > > >
> > > > Do we want to hav
> hi,
>
> Am Freitag, den 29.04.2005, 21:48 +0200 schrieb Peter Vreman:
>> At 18:06 29-4-2005, you wrote:
>> >Hi,
>> >
>> >Am Donnerstag, den 28.04.2005, 07:53 +0200 schrieb Peter Vreman:
>> > > > Hi,
>> > > >
>> > > > I'm trying to add support for generics (templates) to fpc.
>> > > >
>> > > > Do
Hi,
Am Montag, den 02.05.2005, 17:56 +0200 schrieb Peter Vreman:
> > hi,
> >
> > Am Freitag, den 29.04.2005, 21:48 +0200 schrieb Peter Vreman:
> >> At 18:06 29-4-2005, you wrote:
> >> >Hi,
> >> >
> >> >Am Donnerstag, den 28.04.2005, 07:53 +0200 schrieb Peter Vreman:
> >> > > > Hi,
> >> > > >
> >>
Hello,
I am trying to understand what exactly generics are. I read the wiki
page, but there are lot's of code examples and very few explanations.
Can someone explain it to me in a (relatively) simple way?
What problem is it trying to solve?
And how do generics relate to interfaces?
thanks,
Fel
[EMAIL PROTECTED] wrote:
> It isn't clear to me what the current status about Generics is:
> http://www.freepascal.org/wiki/index.php/Generics
2.1.1 contains pre alpha code, they aren't usable yet.. It is subject to
be finished with 2.2.
> Are they Delphi conform
Is there already a specificatio
Florian Klaempfl wrote:
Is there already a specification how they will look like in Delphi?
I think no. But there is already a specification for C#. I guess the
Delphi syntax won't be differ to much from the C# definition:
http://qc.borland.com/wc/qcmain.aspx?d=11168
On 4/9/06, Florian Klaempfl <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> (...)
> Is there already a specification how they will look like in Delphi?
>
> > (.net2)? What's planned? Can somebody explain?
> >
>
> They are more like C++ templates.
What? Do you mean that FPC implementation o
> What? Do you mean that FPC implementation of generics wouldn't be
> based on "type erasure" but on beefed-up-precompiler-macros? Please
> say I got it all wrong :-o
Do you have documents about "type erasure" in native languages where e.g. a
string is not an object ?
_
sts.freepascal.org/mailman/listinfo/fpc-devel
Generics are "type safe".
___
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
Flávio Etrusco wrote:
> On 4/9/06, Florian Klaempfl <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] wrote:
>> (...)
>> Is there already a specification how they will look like in Delphi?
>>
>>> (.net2)? What's planned? Can somebody explain?
>>>
>> They are more like C++ templates.
>
> What? Do you
On 4/9/06, Marco van de Voort <[EMAIL PROTECTED]> wrote:
> > What? Do you mean that FPC implementation of generics wouldn't be
> > based on "type erasure" but on beefed-up-precompiler-macros? Please
> > say I got it all wrong :-o
>
> Do you have documents about "type erasure" in native languages wh
Flávio Etrusco wrote:
> On 4/9/06, Marco van de Voort <[EMAIL PROTECTED]> wrote:
>>> What? Do you mean that FPC implementation of generics wouldn't be
>>> based on "type erasure" but on beefed-up-precompiler-macros? Please
>>> say I got it all wrong :-o
>> Do you have documents about "type erasure"
> On 4/9/06, Marco van de Voort <[EMAIL PROTECTED]> wrote:
> > > What? Do you mean that FPC implementation of generics wouldn't be
> > > based on "type erasure" but on beefed-up-precompiler-macros? Please
> > > say I got it all wrong :-o
> >
> > Do you have documents about "type erasure" in native
On 4/9/06, Florian Klaempfl <[EMAIL PROTECTED]> wrote:
> Flávio Etrusco wrote:
> > On 4/9/06, Florian Klaempfl <[EMAIL PROTECTED]> wrote:
> >> [EMAIL PROTECTED] wrote:
> >> (...)
> >> Is there already a specification how they will look like in Delphi?
> >>
> >>> (.net2)? What's planned? Can somebod
> > > What? Do you mean that FPC implementation of generics wouldn't be
> > > based on "type erasure" but on beefed-up-precompiler-macros? Please
> > > say I got it all wrong :-o
> >
> > You want crippled generics regarding speed and usage like C# has? You
> > can do this with "real" templates as w
Flávio Etrusco wrote:
> On 4/9/06, Florian Klaempfl <[EMAIL PROTECTED]> wrote:
>> Flávio Etrusco wrote:
>>> On 4/9/06, Florian Klaempfl <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] wrote:
(...)
Is there already a specification how they will look like in Delphi?
> (.net2)? Wh
> > I guess I was a bit too hasty on the whining, but just thinking about
> > C++ compilation speed
>
> What compiler? If gcc, gcc does nothing fast, and C++ header model than the
> bit of codegenerating done.
nothing fast ..., _the problem is more_ ... C++ header model
__
I hope I'm not being too annoying, I'm just trying to understand
better your decision/opinion. If you think this discussion is useless
please speak and I'll shut up ;-)
> Well, talking about Java's speed never makes sense.
LOL, I agree :-)
> Fact is, if you use
> classes that you've always an in
On 4/9/06, Marco van de Voort <[EMAIL PROTECTED]> wrote:
> > > I guess I was a bit too hasty on the whining, but just thinking about
> > > C++ compilation speed
> >
> > What compiler? If gcc, gcc does nothing fast, and C++ header model than the
> > bit of codegenerating done.
>
> nothing fast ...,
> > > What compiler? If gcc, gcc does nothing fast, and C++ header model than
> > > the
> > > bit of codegenerating done.
> >
> > nothing fast ..., _the problem is more_ ... C++ header model
>
> VisualC++ 6.
> I know it's much related to C header model and linking, but I never
> saw any "comp
Hi,
Am Sonntag, den 09.04.2006, 18:51 -0300 schrieb Flávio Etrusco:
> I hope I'm not being too annoying, I'm just trying to understand
> better your decision/opinion. If you think this discussion is useless
> please speak and I'll shut up ;-)
>
> > Well, talking about Java's speed never makes sen
On 4/10/06, Danny Milosavljevic <[EMAIL PROTECTED]> wrote:
> Hi,
>
(...)
> > but thing is I can't see much use for generics for low level
> > tasks.
>
> You need them for any kind of compile-time-type-checked collections...
> so as long as you only do I/O port programming, you are safe... no wait,
> Templates' pros:
> - support of primitive types;
> - flexibility (ability to call non-virtual and non-related methods,
> operators, etc);
> - ability of coding for speed.
>
> Type erasure generics' pros:
> - No additional generated code, no code bloat;
> - Code is easier to understand (no addi
On Mon, 10 Apr 2006 23:33:12 -0300
"Flávio Etrusco" <[EMAIL PROTECTED]> wrote:
> Type erasure generics' pros:
What does type erasure mean without a runtime engine (VM) ?
Micha
___
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freep
On 4/11/06, Micha Nelissen <[EMAIL PROTECTED]> wrote:
> On Mon, 10 Apr 2006 23:33:12 -0300
> "Flávio Etrusco" <[EMAIL PROTECTED]> wrote:
>
> > Type erasure generics' pros:
>
> What does type erasure mean without a runtime engine (VM) ?
>
That the "template" is not aware of the instantiated type of
On Tue, 11 Apr 2006 13:06:27 -0300
"Flávio Etrusco" <[EMAIL PROTECTED]> wrote:
> > What does type erasure mean without a runtime engine (VM) ?
>
> That the "template" is not aware of the instantiated type of the
> template parameters, they are only accessed/resolved through oop
> (inheritance/pol
On 4/11/06, Marco van de Voort <[EMAIL PROTECTED]> wrote:
>
> > Templates' pros:
> > - support of primitive types;
> > - flexibility (ability to call non-virtual and non-related methods,
> > operators, etc);
> > - ability of coding for speed.
> >
> > Type erasure generics' pros:
> > - No additional
Hi,
Am Montag, den 10.04.2006, 23:33 -0300 schrieb Flávio Etrusco:
> On 4/10/06, Danny Milosavljevic <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> (...)
> > > but thing is I can't see much use for generics for low level
> > > tasks.
> >
> > You need them for any kind of compile-time-type-checked collec
On 4/11/06, Danny Milosavljevic <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Am Montag, den 10.04.2006, 23:33 -0300 schrieb Flávio Etrusco:
> > On 4/10/06, Danny Milosavljevic <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > (...)
> > > > but thing is I can't see much use for generics for low level
> > > > t
> On 4/11/06, Marco van de Voort <[EMAIL PROTECTED]> wrote:
>>
>> > Templates' pros:
>> > - support of primitive types;
>> > - flexibility (ability to call non-virtual and non-related methods,
>> > operators, etc);
>> > - ability of coding for speed.
>> >
>> > Type erasure generics' pros:
>> > - No
Hi,
Am Dienstag, den 11.04.2006, 18:56 -0300 schrieb Flávio Etrusco:
> On 4/11/06, Danny Milosavljevic <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > Am Montag, den 10.04.2006, 23:33 -0300 schrieb Flávio Etrusco:
> > > On 4/10/06, Danny Milosavljevic <[EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > >
> >
It isn't clear to me what the current status about Generics is:
http://www.freepascal.org/wiki/index.php/Generics
http://www.dummzeuch.de/delphi/object_pascal_templates/english.html
http://community.borland.com/article/0,1410,27603,00.html
-Bee-
has Bee.ography at
http://beeography.wordpress.
On Wed, 12 Apr 2006 08:31:58 +0200 (CEST)
"Peter Vreman" <[EMAIL PROTECTED]> wrote:
> FPC is a compiled language where not all types are classes. The only way
> to implement it is like C++ templates. It is a known fact that generics
> will introduce code bloat, but that is still less than the 15-2
On 4/12/06, Bisma Jayadi <[EMAIL PROTECTED]> wrote:
> > It isn't clear to me what the current status about Generics is:
> > http://www.freepascal.org/wiki/index.php/Generics
>
> http://www.dummzeuch.de/delphi/object_pascal_templates/english.html
>
> http://community.borland.com/article/0,1410,27603
It isn't clear to me what the current status about Generics is:
http://www.freepascal.org/wiki/index.php/Generics
http://www.dummzeuch.de/delphi/object_pascal_templates/english.html
http://community.borland.com/article/0,1410,27603,00.html
Ingenious! I really feel stupid for not thinking of s
On 13 apr 2006, at 00:29, Flávio Etrusco wrote:
http://www.dummzeuch.de/delphi/object_pascal_templates/english.html
http://community.borland.com/article/0,1410,27603,00.html
Ingenious! I really feel stupid for not thinking of something that
simple like this before :-)
Something similar is
Flávio Etrusco wrote:
On 4/12/06, Bisma Jayadi <[EMAIL PROTECTED]> wrote:
It isn't clear to me what the current status about Generics is:
http://www.freepascal.org/wiki/index.php/Generics
http://www.dummzeuch.de/delphi/object_pascal_templates/english.html
http://community.borland.com/article
Op Thu, 13 Apr 2006, schreef Marc Weustink:
> > Ingenious! I really feel stupid for not thinking of something that
> > simple like this before :-)
>
> Is it possible this way to "derive" 2 (or more) classes in one unit from the
> same generic ?
The matrix unit does it. It uses FPC's preprocess
Marc Weustink wrote:
Flávio Etrusco wrote:
On 4/12/06, Bisma Jayadi <[EMAIL PROTECTED]> wrote:
It isn't clear to me what the current status about Generics is:
http://www.freepascal.org/wiki/index.php/Generics
http://www.dummzeuch.de/delphi/object_pascal_templates/english.html
http://commu
Op Wed, 20 Dec 2006, schreef Vincent Snijders:
> Will fpc support generic record declarations like this:
>
> type
> generic TFixedKeyNode = record
> key: array[0..KeySize-1] of char;
> value: dword;
> end;
>
> In other word the type is not parameterized by another type but by an integer
> us
Daniël Mantione schreef:
Op Wed, 20 Dec 2006, schreef Vincent Snijders:
Will fpc support generic record declarations like this:
type
generic TFixedKeyNode = record
key: array[0..KeySize-1] of char;
value: dword;
end;
In other word the type is not parameterized by another type but by an int
Will fpc support generic record declarations like this:
type
generic TFixedKeyNode = record
key: array[0..KeySize-1] of char;
value: dword;
end;
In other word the type is not parameterized by another type but by an
integer used to define the upper limit of an array.
Free Pascal
Op Wed, 20 Dec 2006, schreef Vincent Snijders:
> Daniël Mantione schreef:
> >
> > Op Wed, 20 Dec 2006, schreef Vincent Snijders:
> >
> > > Will fpc support generic record declarations like this:
> > >
> > > type
> > > generic TFixedKeyNode = record
> > > key: array[0..KeySize-1] of char;
> >
> Op Wed, 20 Dec 2006, schreef Vincent Snijders:
>
> >
> > In other word the type is not parameterized by another type but by an
> > integer
> > used to define the upper limit of an array.
>
> Basically, isn't this similar to a schema type like you have in Extended
> Pascal?
Aren't those autom
Op Wed, 20 Dec 2006, schreef Marco van de Voort:
> > Op Wed, 20 Dec 2006, schreef Vincent Snijders:
> >
> > >
> > > In other word the type is not parameterized by another type but by an
> > > integer
> > > used to define the upper limit of an array.
> >
> > Basically, isn't this similar to a
> Op Wed, 20 Dec 2006, schreef Marco van de Voort:
> > > > In other word the type is not parameterized by another type but by an
> > > > integer
> > > > used to define the upper limit of an array.
> > >
> > > Basically, isn't this similar to a schema type like you have in Extended
> > > Pascal?
>
Op Wed, 20 Dec 2006, schreef Marco van de Voort:
> > Op Wed, 20 Dec 2006, schreef Marco van de Voort:
> > > > > In other word the type is not parameterized by another type but by an
> > > > > integer
> > > > > used to define the upper limit of an array.
> > > >
> > > > Basically, isn't this si
No. Generics are more like using a macro when defining a type.
So a ":=" copies the memory and not a pointer and they are passed by
value into a procedure.
-Michael
___
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org
Michael Schnell schreef:
No. Generics are more like using a macro when defining a type.
So a ":=" copies the memory and not a pointer and they are passed by
value into a procedure.
I think you cut too much context. To which question does this give an answer?
Vincent
__
Michael Schnell schreef:
No. Generics are more like using a macro when defining a type.
So a ":=" copies the memory and not a pointer and they are passed by
value into a procedure.
I think you cut too much context. To which question does this give an
answer?
(Don't you see the link to t
On Thu, 16 Aug 2007, Mattias Gaertner wrote:
>
> What is the state and future plans of generics?
> I only found the wiki page
>
> http://wiki.lazarus.freepascal.org/Generics
>
> which does not even mention the current syntax.
The current syntax is descibed in the docs, reference manual.
Ther
--- Michael Van Canneyt <[EMAIL PROTECTED]> escribió:
>
>
> On Thu, 16 Aug 2007, Mattias Gaertner wrote:
>
> >
> > What is the state and future plans of generics?
> > I only found the wiki page
> >
> > http://wiki.lazarus.freepascal.org/Generics
> >
> > which does not even mention the curre
--- Jesus Reyes <[EMAIL PROTECTED]> escribió:
>
> --- Michael Van Canneyt <[EMAIL PROTECTED]> escribió:
>
> >
> >
> > On Thu, 16 Aug 2007, Mattias Gaertner wrote:
> >
> > >
> > > What is the state and future plans of generics?
> > > I only found the wiki page
> > >
> > > http://wiki.lazaru
On Thu, 16 Aug 2007, Jesus Reyes wrote:
>
> --- Michael Van Canneyt <[EMAIL PROTECTED]> escribió:
>
> >
> >
> > On Thu, 16 Aug 2007, Mattias Gaertner wrote:
> >
> > >
> > > What is the state and future plans of generics?
> > > I only found the wiki page
> > >
> > > http://wiki.lazarus.fre
On Thu, 16 Aug 2007 14:59:47 -0500 (CDT)
Jesus Reyes <[EMAIL PROTECTED]> wrote:
>
> --- Jesus Reyes <[EMAIL PROTECTED]> escribió:
>
> >
> > --- Michael Van Canneyt <[EMAIL PROTECTED]> escribió:
> >
> > >
> > >
> > > On Thu, 16 Aug 2007, Mattias Gaertner wrote:
> > >
> > > >
> > > > What is
On Thu, 16 Aug 2007, Mattias Gaertner wrote:
> On Thu, 16 Aug 2007 14:59:47 -0500 (CDT)
> Jesus Reyes <[EMAIL PROTECTED]> wrote:
>
> >
> > --- Jesus Reyes <[EMAIL PROTECTED]> escribió:
> >
> > >
> > > --- Michael Van Canneyt <[EMAIL PROTECTED]> escribió:
> > >
> > > >
> > > >
> > > > On T
On Thu, 16 Aug 2007 23:31:25 +0200 (CEST)
Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
>[...]
> > Why is the local variable block needed?
>
> It is not. I asked the same question. It was added for symmetry
> reasons: if a local type block is allowed, then a var block should
> also be allowed.
>
Mattias Gaertner schrieb:
On Thu, 16 Aug 2007 23:31:25 +0200 (CEST)
Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
[...]
Why is the local variable block needed?
It is not. I asked the same question. It was added for symmetry
reasons: if a local type block is allowed, then a var block should
a
On Fri, 17 Aug 2007, Florian Klaempfl wrote:
> Mattias Gaertner schrieb:
> > On Thu, 16 Aug 2007 23:31:25 +0200 (CEST)
> > Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
> >
> > > [...]
> > > > Why is the local variable block needed?
> > > It is not. I asked the same question. It was added for
Michael Van Canneyt schrieb:
On Fri, 17 Aug 2007, Florian Klaempfl wrote:
Mattias Gaertner schrieb:
On Thu, 16 Aug 2007 23:31:25 +0200 (CEST)
Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
[...]
Why is the local variable block needed?
It is not. I asked the same question. It was added for
On Fri, 17 Aug 2007, Florian Klaempfl wrote:
> Michael Van Canneyt schrieb:
> >
> > On Fri, 17 Aug 2007, Florian Klaempfl wrote:
> >
> > > Mattias Gaertner schrieb:
> > > > On Thu, 16 Aug 2007 23:31:25 +0200 (CEST)
> > > > Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
> > > >
> > > > > [...]
On Fri, 17 Aug 2007 10:20:13 +0200 (CEST)
Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
>[...]
> > > > > What local types are/will be allowed?
> > > > >
> > > > > For example, this is currently not allowed:
> > > > >
> > > > > generic TTree = class(TObject)
> > > > > type public TTreeNode =
Mattias Gaertner wrote:
For example, this is currently not allowed:
generic TTree = class(TObject)
type public
TTreeNode = specialize TNode;
end;
Shouldn't this be allowed?
Perhaps it can only work with a complete TTreeNode description, probably
the TNode is specific for use by T
Florian Klaempfl wrote:
Mattias Gaertner schrieb:
For example, this is currently not allowed:
generic TTree = class(TObject)
type public TTreeNode = specialize TNode;
end;
And this neither:
generic TTree = class(TObject)
type public
TTreeNode = class
Data: T;
end;
Hello,
Has anyone experienced issues with generics? I have the following code:
unit cdescreen;
{$mode delphi}
interface
uses
// LCL, RTL, FCL
Classes, SysUtils, Controls, Graphics, LCLType, SDFData, fpimage,
fgl,
//
cdeconfig, cdeprovinces, cdeutils, cdegame, cdetypes, dlgstatus;
ty
Hi there,
Currently this code:
TSomeObject = Class;
TSomeOtherObject = Class(TSomeObject );
And finally:
TMyObject = Class;
TSomeOtherOtherObject = Class(TSomeOtherObject );
Comes up with error 'got "T" expected "TObject"' .. But TMyObject is
based off of TObject?
- Dennis
Impossible! :O *Finally*! Thanks Sven! Totally unexpected event. ;)
I'd like to use Generics.Collections in stable release ASAP but... IMO best
version for release is 3.2 (even 3.0.4 is probably to early). I need to
review latest changes in trunk for generics to correct library (package?)
code, be
Am 30.07.2016 18:10 schrieb "Maciej Izak" :
>
> Impossible! :O *Finally*! Thanks Sven! Totally unexpected event. ;)
Expect the unexpected :P
> I'd like to use Generics.Collections in stable release ASAP but... IMO
best version for release is 3.2 (even 3.0.4 is probably to early). I need
to review
2016-07-30 18:40 GMT+02:00 Sven Barth :
> please check the changes I've made (they're mentioned both in the commit
> as well as the issue).
>
> merged into github repo
> Maybe you should add an "experimental" modifier to these types so that one
> knows that they're unstable.
>
I've made that lon
Hello,
I was coding and I suddently saw that need to use a typed list. I went
with TFPList, but considering we already have compiler support I
thougth that maybe we could have a basic library with useful classes
using generics. I searched on fpc 2.2.0 sources a lot, but I couldn't
find anything.
>Hello,
>
>I am trying to understand what exactly generics are. I read the wiki
>page, but there are lot's of code examples and very few explanations.
>Can someone explain it to me in a (relatively) simple way?
>
>What problem is it trying to solve?
>
>And how do generics relate to interfaces?
I
Hi,
Am Dienstag, den 08.11.2005, 18:10 -0200 schrieb Felipe Monteiro de
Carvalho:
> Hello,
>
> I am trying to understand what exactly generics are. I read the wiki
> page, but there are lot's of code examples and very few explanations.
> Can someone explain it to me in a (relatively) simple way?
On Tuesday 08 November 2005 21:33, L505 wrote:
> >Hello,
> >
> >I am trying to understand what exactly generics are. I read the wiki
> >page, but there are lot's of code examples and very few explanations.
> >Can someone explain it to me in a (relatively) simple way?
> >
> >What problem is it tryin
>
> The Very Big Advantage (Tm), is that you get syntax checking, while still
> using a type diversely. That's impossible to do (at compile-time) without
> generics.
>
> Probably the best example of this is something like TList:
>
> Without generics:
>
> TOrange = class ... end;
> TApple = class
L505 wrote:
The Very Big Advantage (Tm), is that you get syntax checking, while still
using a type diversely. That's impossible to do (at compile-time) without
generics.
Probably the best example of this is something like TList:
Without generics:
TOrange = class ... end;
TApple = class ... en
dannym wrote:
Hi,
Am Dienstag, den 08.11.2005, 18:10 -0200 schrieb Felipe Monteiro de
Carvalho:
Hello,
I am trying to understand what exactly generics are. I read the wiki
page, but there are lot's of code examples and very few explanations.
Can someone explain it to me in a (relatively) s
I´m starting to like generics, specially for this:
> (as a side note, note the only reason why anybody bothers with type safe
> compiled languages is strong type checking, that is total _compile time_
> strong type checking, also known as "if it compiles, it works (mostly)".
> If it weren't for th
Op Wed, 9 Nov 2005, schreef Pavel V. Ozerski:
> Hello all,
> I didn't discuss about this idea but now I would say something. Is it
> really important, to integrate templates support into compiler? Maybe
> an external preprocessing utility should be better? I think, an
> integrated complex prepro
Daniël Mantione wrote:
Ok, lets put it blunt. It is absolutely not important to have templates at
all. We've been able to develop top class code of the best kind without
templates.
That is true. Yet I really like the type-safety of templates. Advantages
include:
- you have to type less type c
Op Wed, 9 Nov 2005, schreef Bram Kuijvenhoven:
> Daniël Mantione wrote:
> (Ok, maybe I'm exaggerating a little bit, but don't you agree generics /are/
> useful?)
Certainly I do agree. However, they *will* be used to introduce the
bloated programming I described. I don't think we should be hap
Daniël Mantione wrote:
Op Wed, 9 Nov 2005, schreef Bram Kuijvenhoven:
Daniël Mantione wrote:
(Ok, maybe I'm exaggerating a little bit, but don't you agree generics /are/
useful?)
Certainly I do agree. However, they *will* be used to introduce the
bloated programming I described. I don't think
> Dani?l Mantione wrote:
> >>Won't the compiler sometimes be able to handle this smarter? When the code
> >>generated for vector and vector is equivalent, we only
> >>need
> >>to include it once in the resulting executable, right? The only thing is we
> >>have to see when this situation occurs.
>
Op Wed, 9 Nov 2005, schreef Bram Kuijvenhoven:
> > These tricks have been used in some C++ compilers with very limited
> > success. The problem is that class_a has a different virtual
> > methods/constructors/destructors than class b, so the code to be
> > generated for them will be different, e
Daniël Mantione wrote:
But...
Templates can save typing. People are demanding them, because there is a
hype. Lack of templates is seen as a deficiency of Pascal against C++.
So we should support them.
Daniël
Agreed. I have a 2000 lines unit containing type safe lists that would
become 300
>> There's a big risk involved with templates; code bloat. Namely, with
>> templates, you can instantiate classes without realising that you are
>> adding tens of kilobytes of code.
>>
>> I.e. in C++ if you instantiate a vector, vector,
>> vector, you have three implementations of the vector in you
On Tue, Nov 08, 2005 at 10:00:49PM +0100, dannym wrote:
> Hi,
>
> Am Dienstag, den 08.11.2005, 18:10 -0200 schrieb Felipe Monteiro de
> Carvalho:
> > Hello,
> >
> > I am trying to understand what exactly generics are. I read the wiki
> > page, but there are lot's of code examples and very few exp
1 - 100 of 159 matches
Mail list logo