Re: [fpc-devel] Templates / Generics; Vote

2005-11-10 Thread listmember

As far as voting goes, personally, I prefer something like this: GList = 
generic class(T)

And, are we going to have non-class rotines, such as event declarations; i.e.

  TGenericCallback = generic function(AValue1: TGenericValue; AValue2: 
TGenericValue): Integer;

  TSomeGenericEvent = generic procedure(ASender: TObject; ACallBack: 
TGenericCallback) of object;

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Templates / Generics; Vote

2005-11-09 Thread Vincent Snijders

[EMAIL PROTECTED] wrote:



Delphi.Net2.0 is using 
Chrome is using 
C# is using 
C/C++ is using 

Why should FPC use generics ???


Because it is more readable.  is an operator and therefore should not 
be used as bracket in generic definition.




That b.s. will break the Delphi code base!


What is b.s.? If it means (somehow) syntax for generics, then this 
argument is easy to refute:
1. There is no native (i.e. win32) Delphi code base (yet) that uses 
generics, so that won't be broken.
2. Delphi.Net 2.0 code is not yet released and exact syntax is therefore 
subject to change, so it cannot be used as example.


Vincent.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Templates / Generics; Vote

2005-11-09 Thread Marcel Martin

[EMAIL PROTECTED] wrote:

Delphi.Net2.0 is using 
Chrome is using 
C# is using 
C/C++ is using 

Why should FPC use generics ???


Why should FPC be Pascal-ish? Is that your question? :-)

mm

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Templates / Generics; Vote

2005-11-09 Thread Micha Nelissen
On Wed, 09 Nov 2005 19:16:46 +0100
[EMAIL PROTECTED] wrote:

 Delphi.Net2.0 is using 

Uncertain.

 Chrome is using 

Not inventive enough to come up with something of their own and simply
following .NET C# syntax.

 C# is using 

Duh. It's a C derivative.

 C/C++ is using 

Duh, they like short symbols.
 
 Why should FPC use generics ???

Because we like it?

 That b.s. will break the Delphi code base!

Who the *hell* are you with that tone?! Come on, we're just discussing pros
and cons, who knows what the final syntax will be?

Micha
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Templates / Generics; Vote

2005-11-09 Thread Micha Nelissen

Micha Nelissen wrote:

Come on, we're just discussing pros
and cons, who knows what the final syntax will be?


Ok, to prove this, I've added some ugly examples posted on IRC in the 
wiki. Look at the bottom of generic keyword syntax examples.


Anyone an idea ? :-)

Micha

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Templates / Generics; Vote

2005-11-09 Thread Marco van de Voort
 
  Pro  reason will probably be: compatibility.
  Pro generic will probably be: more Pascal-alike/readability.
 
 Delphi.Net2.0 is using 
 Chrome is using 
 C# is using 
 C/C++ is using 
 
 Why should FPC use generics ???

Why not if it is better readable and in the parser? None of the template
using code in these will port to FPC regardless.

People that can't memorise this difference shouldn't be using generics at
all :)

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Templates / Generics; Vote

2005-11-09 Thread Micha Nelissen

Micha Nelissen wrote:
Ok, to prove this, I've added some ugly examples posted on IRC in the 
wiki. Look at the bottom of generic keyword syntax examples.


Anyone an idea ? :-)


Ok I've posted under Suggestion 2 a slightly modified syntax. Let me 
know what you think.


Micha

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel