Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-31 Thread Michael Van Canneyt
On Fri, 31 Jul 2015, Maciej Izak wrote: 2015-07-31 8:37 GMT+02:00 Michael Van Canneyt : Attributes: http://svn.freepascal.org/svn/fpc/branches/joost/classattributes/ Looks like "dead branch"... No, it is not. It looks dead because the support is long finished, but it has not been inte

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-30 Thread Maciej Izak
2015-07-31 8:37 GMT+02:00 Michael Van Canneyt : > Attributes: > > http://svn.freepascal.org/svn/fpc/branches/joost/classattributes/ > > Looks like "dead branch"... > New RTTI (I think): > http://svn.freepascal.org/svn/fpc/branches/interfacertti/ IIRC this is bugfix for mORMot framework related

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-30 Thread Michael Van Canneyt
On Thu, 30 Jul 2015, Joao Morais wrote: On 24/07/15 04:10, Michael Van Canneyt wrote: Attributes and RTTI will come as soon as 3.0 are out of the door. Hello Michael, merging to trunk I presume. Provided that attributes and new rtti are two of the best things since the discover of the fi

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-30 Thread Joao Morais
On 24/07/15 04:10, Michael Van Canneyt wrote: Attributes and RTTI will come as soon as 3.0 are out of the door. Hello Michael, merging to trunk I presume. Provided that attributes and new rtti are two of the best things since the discover of the fire and the wheel, is there some branch I co

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-30 Thread silvioprog
On Fri, Jul 24, 2015 at 4:10 AM, Michael Van Canneyt wrote: > > On Fri, 24 Jul 2015, silvioprog wrote: >> >> After that, we can still see about new modes. I'm not arguing about that. >>> >>> Michael. >>> >> >> Are you talking about compatibility to Delphi 5/7? >> >> There are already many new grea

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-24 Thread Michael Van Canneyt
On Fri, 24 Jul 2015, silvioprog wrote: After that, we can still see about new modes. I'm not arguing about that. Michael. Are you talking about compatibility to Delphi 5/7? There are already many new great components available on network, however it uses some basic new Delphi features lik

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-23 Thread silvioprog
On Fri, Jul 17, 2015 at 1:32 PM, Michael Van Canneyt wrote: > > On Fri, 17 Jul 2015, silvioprog wrote: >> >> On Fri, Jul 17, 2015 at 11:24 AM, Graeme Geldenhuys < >> mailingli...@geldenhuys.co.uk> wrote: >> >>> On 2015-07-17 15:08, silvioprog wrote: Using the generics I could do a generi

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-19 Thread Sven Barth
Am 19.07.2015 21:37 schrieb "Florian Klämpfl" : > > Am 16.07.2015 um 22:40 schrieb Sven Barth: > > > > In the end your code above will look like this in mode ObjFPC: > > > > === code begin === > > > > var > > X: specialize SmartObj >, > > string> >; > > // the spaces between the "> >" are added,

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-19 Thread Florian Klämpfl
Am 16.07.2015 um 22:40 schrieb Sven Barth: > > In the end your code above will look like this in mode ObjFPC: > > === code begin === > > var > X: specialize SmartObj TList >, > string> >; > // the spaces between the "> >" are added, because I don't know yet whether > I'll be able to deal > wi

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Sven Barth
On 17.07.2015 18:32, Michael Van Canneyt wrote: I'm working in a new lib and I'm having several problems to keep compatibility betten FPC and Delphi, so I'm using a lot of IFDEFs, even using mode delphi. To improve this situation I advocate NOT yet to spend effort on new language modes, but fir

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Michael Van Canneyt
On Fri, 17 Jul 2015, silvioprog wrote: On Fri, Jul 17, 2015 at 11:24 AM, Graeme Geldenhuys < mailingli...@geldenhuys.co.uk> wrote: On 2015-07-17 15:08, silvioprog wrote: Using the generics I could do a generic DAO that could be used by any class, avoiding TPersonDAO, TProductDAO, TOtherMyEn

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread silvioprog
On Fri, Jul 17, 2015 at 11:24 AM, Graeme Geldenhuys < mailingli...@geldenhuys.co.uk> wrote: > On 2015-07-17 15:08, silvioprog wrote: > > Using the generics I could do a generic > > DAO that could be used by any class, avoiding TPersonDAO, TProductDAO, > > TOtherMyEntityDAO and providing a simple a

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Graeme Geldenhuys
On 2015-07-17 15:08, silvioprog wrote: > Using the generics I could do a generic > DAO that could be used by any class, avoiding TPersonDAO, TProductDAO, > TOtherMyEntityDAO and providing a simple and useful CRUD layer: just I fully appreciate that there could be some uses, but I don't agree it m

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread silvioprog
On Fri, Jul 17, 2015 at 3:06 AM, Graeme Geldenhuys < mailingli...@geldenhuys.co.uk> wrote: > On 2015-07-17 03:34, silvioprog wrote: > > TPersonDao = class(TObject) > > public > > procedure Save(APerson: TObject); > > end; > > Simply change that to the following: > > TPersonDao = class(TObject) >

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread silvioprog
On Fri, Jul 17, 2015 at 3:09 AM, Sven Barth wrote: > Am 17.07.2015 08:06 schrieb "Graeme Geldenhuys" < > mailingli...@geldenhuys.co.uk>: > > > > On 2015-07-17 03:34, silvioprog wrote: > > > TPersonDao = class(TObject) > > > public > > > procedure Save(APerson: TObject); > > > end; > > > > Simpl

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Jonas Maebe
Sven Barth wrote: Am 17.07.2015 11:06 schrieb "Nikolay Nikolov" mailto:nick...@gmail.com>>: > Btw, just an idea: why not make the generic syntax a {$modeswitch}? > This way people will be able to switch on the delphi generics syntax in > objfpc mode. That's on my ToDo list for quite some time

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Marcos Douglas
On Fri, Jul 17, 2015 at 7:00 AM, Sven Barth wrote: > Am 17.07.2015 11:06 schrieb "Nikolay Nikolov" : >> >> >> >> On 07/16/2015 11:29 PM, Sven Barth wrote: >>> >>> On 16.07.2015 21:04, Marco van de Voort wrote: In our previous episode, Sven Barth said: >> >> sadly - no, only in De

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Sven Barth
Am 17.07.2015 11:06 schrieb "Nikolay Nikolov" : > > > > On 07/16/2015 11:29 PM, Sven Barth wrote: >> >> On 16.07.2015 21:04, Marco van de Voort wrote: >>> >>> In our previous episode, Sven Barth said: > > sadly - no, only in Delphi mode. btw. this thing keep me away from objfpc. >

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Michael Van Canneyt
On Fri, 17 Jul 2015, Nikolay Nikolov wrote: On 07/16/2015 11:29 PM, Sven Barth wrote: On 16.07.2015 21:04, Marco van de Voort wrote: In our previous episode, Sven Barth said: sadly - no, only in Delphi mode. btw. this thing keep me away from objfpc. Then let me tell you that generic m

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Nikolay Nikolov
On 07/16/2015 11:29 PM, Sven Barth wrote: On 16.07.2015 21:04, Marco van de Voort wrote: In our previous episode, Sven Barth said: sadly - no, only in Delphi mode. btw. this thing keep me away from objfpc. Then let me tell you that generic methods will arrive in mode ObjFPC (and thus its

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Graeme Geldenhuys
On 2015-07-17 08:24, Michael Van Canneyt wrote: > > And this is why I firmly believe we need more libraries to actually > do things, instead of more changes to the language. Exactly. And why I love the concept of FCL so much. There are tons of useful stuff in there. I'm not saying all libraries s

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Michael Van Canneyt
On Fri, 17 Jul 2015, Graeme Geldenhuys wrote: On 2015-07-17 07:57, Michael Van Canneyt wrote: Simple: there is a bigger community, and more ready-to-use code floating on internet. The language itself has absolutely nothing to do with it. +1 Well said. I know this is a huge generalisation

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-17 Thread Graeme Geldenhuys
On 2015-07-17 07:57, Michael Van Canneyt wrote: > Simple: there is a bigger community, and more ready-to-use code > floating on internet. The language itself has absolutely nothing to > do with it. +1 Well said. I know this is a huge generalisation (normally not a good thing), but most web (JS)

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Michael Van Canneyt
On Thu, 16 Jul 2015, silvioprog wrote: Currently I made a wery fast websocket server[1] using Node.js, and I had some dificult to find an updated WS Pascal client compatible with FPC 3 and XE8, so I found one called Bauglir websocket, after some changes I could compile it in both compilers.

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Sven Barth
Am 17.07.2015 08:06 schrieb "Graeme Geldenhuys" < mailingli...@geldenhuys.co.uk>: > > On 2015-07-17 03:34, silvioprog wrote: > > TPersonDao = class(TObject) > > public > > procedure Save(APerson: TObject); > > end; > > Simply change that to the following: > > TPersonDao = class(TObject) > public

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Sven Barth
Am 17.07.2015 05:03 schrieb "silvioprog" : > Hm... and more, the 'i := 1 << 1' isn't a "more Pascal-like" syntax, IMHO. =) Definitely. I was surprised when I found out that this works (it had been added sometime in the far past to simplyfy porting of C code) and nowadays it hunts me, because it ma

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Graeme Geldenhuys
On 2015-07-17 03:34, silvioprog wrote: > TPersonDao = class(TObject) > public > procedure Save(APerson: TObject); > end; Simply change that to the following: TPersonDao = class(TObject) public procedure Save(APerson: TPerson); end; and you could have compile time validation too. Using TObjec

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread silvioprog
On Thu, Jul 16, 2015 at 5:40 PM, Sven Barth wrote: > On 16.07.2015 22:17, Maciej Izak wrote: > >> 2015-07-16 17:23 GMT+02:00 Sven Barth > >: >> >> >> Then let me tell you that generic methods will arrive in mode ObjFPC >> (and thus its syntax) first, be

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread silvioprog
On Thu, Jul 16, 2015 at 11:34 PM, silvioprog wrote: [...] ... allowing us to do core more fast ... I meant "allowing us to do code more fast". =D -- Silvio Clécio My public projects - github.com/silvioprog ___ fpc-pascal maillist - fpc-pascal@lists.

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread silvioprog
On Thu, Jul 16, 2015 at 11:34 PM, silvioprog wrote: [...] > ... // a type, for example (mistakes happen, we are human =D ) > I meant "a typo, for example". ^^' -- Silvio Clécio My public projects - github.com/silvioprog ___ fpc-pascal maillist -

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread silvioprog
On Thu, Jul 16, 2015 at 6:44 PM, Michael Van Canneyt wrote: > > On Thu, 16 Jul 2015, Maciej Izak wrote: > >> 2015-07-16 17:23 GMT+02:00 Sven Barth : >> >> Then let me tell you that generic methods will arrive in mode >> ObjFPC (and thus its syntax) first, because the Delphi syntax is a PITA

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Michael Van Canneyt
On Thu, 16 Jul 2015, Maciej Izak wrote: 2015-07-16 17:23 GMT+02:00 Sven Barth : Then let me tell you that generic methods will arrive in mode ObjFPC (and thus its syntax) first, because the Delphi syntax is a PITA to parse/handle. (in fact generic methods are already working in

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Maciej Izak
2015-07-16 22:40 GMT+02:00 Sven Barth : > var >>X: strong TDictionary, string>; >> > > Prefixed modifiers are the /worst/ you can do for Pascal. > it is already being done by introducing "specialize" keyword. I have totally different opinion :) for me it is beautiful: http://docs.elementsco

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Sven Barth
On 16.07.2015 22:17, Maciej Izak wrote: 2015-07-16 17:23 GMT+02:00 Sven Barth mailto:pascaldra...@googlemail.com>>: Then let me tell you that generic methods will arrive in mode ObjFPC (and thus its syntax) first, because the Delphi syntax is a PITA to parse/handle. (in fact gen

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Sven Barth
On 16.07.2015 21:04, Marco van de Voort wrote: In our previous episode, Sven Barth said: sadly - no, only in Delphi mode. btw. this thing keep me away from objfpc. Then let me tell you that generic methods will arrive in mode ObjFPC (and thus its syntax) first, because the Delphi syntax is a

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Sven Barth
On 16.07.2015 19:21, Michael Van Canneyt wrote: The whole generics mess that Delphi made goes completely against the Pascal dictum that you must declare something before you can use it. To me, the above verbose construction makes absolute sense. It has been so since day 1: PRecord = ^TRecord; T

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Maciej Izak
2015-07-16 17:23 GMT+02:00 Sven Barth : > Then let me tell you that generic methods will arrive in mode ObjFPC (and > thus its syntax) first, because the Delphi syntax is a PITA to parse/handle. > > (in fact generic methods are already working in mode ObjFPC in my local > repo, I just want to get

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Graeme Geldenhuys
On 2015-07-16 20:04, Marco van de Voort wrote: > > https://xkcd.com/927/ +1 Sadly that is the way the current world works. :) Regards, - Graeme - ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailma

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Marcos Douglas
On Thu, Jul 16, 2015 at 1:46 PM, Sven Barth wrote: > On 16.07.2015 17:53, Marcos Douglas wrote: >> >> [...] >> >> I didn't understand. This already works... or you talking about "work >> with the same syntax than Delphi in mode objfpc"? > > > Generic methods are not yet supported by FPC. Try the f

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Marco van de Voort
In our previous episode, Sven Barth said: > > sadly - no, only in Delphi mode. btw. this thing keep me away from objfpc. > > > > Then let me tell you that generic methods will arrive in mode ObjFPC (and > thus its syntax) first, because the Delphi syntax is a PITA to parse/handle. https://xkcd.co

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Michael Van Canneyt
On Thu, 16 Jul 2015, silvioprog wrote: On Thu, Jul 16, 2015 at 2:21 PM, Michael Van Canneyt wrote: On Thu, 16 Jul 2015, Marcos Douglas wrote: On Thu, Jul 16, 2015 at 11:44 AM, Michael Van Canneyt wrote: On Thu, 16 Jul 2015, Maciej Izak wrote

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Marcos Douglas
On Thu, Jul 16, 2015 at 1:39 PM, Sven Barth wrote: > On 16.07.2015 18:02, Marcos Douglas wrote: >> >> [...] >> >> Yes, but do you think this is more verbose unnecessarily? Because the >> syntax TFoo (I mean this "<>") show us that is a generic, don't? > > > This might be the case for a human, but

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread silvioprog
On Thu, Jul 16, 2015 at 2:21 PM, Michael Van Canneyt wrote: > On Thu, 16 Jul 2015, Marcos Douglas wrote: > >> On Thu, Jul 16, 2015 at 11:44 AM, Michael Van Canneyt >> wrote: >> >>> >>> >>> On Thu, 16 Jul 2015, Maciej Izak wrote: >>> >>> sadly - no, only in Delphi mode. btw. this thing keep me a

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Michael Van Canneyt
On Thu, 16 Jul 2015, Marcos Douglas wrote: On Thu, Jul 16, 2015 at 11:44 AM, Michael Van Canneyt wrote: On Thu, 16 Jul 2015, Maciej Izak wrote: sadly - no, only in Delphi mode. btw. this thing keep me away from objfpc. That seems like a very strange reason to me. The fact that you mu

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Sven Barth
On 16.07.2015 17:53, Marcos Douglas wrote: On Thu, Jul 16, 2015 at 12:23 PM, Sven Barth wrote: Am 16.07.2015 16:34 schrieb "Maciej Izak" : sadly - no, only in Delphi mode. btw. this thing keep me away from objfpc. Then let me tell you that generic methods will arrive in mode ObjFPC (and th

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Sven Barth
On 16.07.2015 18:02, Marcos Douglas wrote: On Thu, Jul 16, 2015 at 11:44 AM, Michael Van Canneyt wrote: On Thu, 16 Jul 2015, Maciej Izak wrote: sadly - no, only in Delphi mode. btw. this thing keep me away from objfpc. That seems like a very strange reason to me. The fact that you must

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Graeme Geldenhuys
On 2015-07-16 17:02, Marcos Douglas wrote: > Sometimes the IDE shows an error in interface declaration, but compiles. > So, to not receive these errors I have to create a new type: So, that is then a bug in Lazarus's codetools or parser - report it for the Lazarus project. Regards, - Graeme -

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Marcos Douglas
On Thu, Jul 16, 2015 at 11:44 AM, Michael Van Canneyt wrote: > > > On Thu, 16 Jul 2015, Maciej Izak wrote: > >> sadly - no, only in Delphi mode. btw. this thing keep me away from objfpc. > > > That seems like a very strange reason to me. > > The fact that you must type 1 word in certain places kee

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Graeme Geldenhuys
On 2015-07-16 16:53, Marcos Douglas wrote: > I would like to know why exists this difference, what the advantages > for mode objfpc using this syntax. Michael already answered that. "It is meant to help you, to make explicit you are in fact specializing a new type." The objfpc mode is normally m

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Marcos Douglas
On Thu, Jul 16, 2015 at 12:23 PM, Sven Barth wrote: > Am 16.07.2015 16:34 schrieb "Maciej Izak" : >> >> sadly - no, only in Delphi mode. btw. this thing keep me away from objfpc. >> > > Then let me tell you that generic methods will arrive in mode ObjFPC (and > thus its syntax) first, because the

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Sven Barth
Am 16.07.2015 16:34 schrieb "Maciej Izak" : > > sadly - no, only in Delphi mode. btw. this thing keep me away from objfpc. > Then let me tell you that generic methods will arrive in mode ObjFPC (and thus its syntax) first, because the Delphi syntax is a PITA to parse/handle. (in fact generic metho

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Michael Van Canneyt
On Thu, 16 Jul 2015, Maciej Izak wrote: sadly - no, only in Delphi mode. btw. this thing keep me away from objfpc. That seems like a very strange reason to me. The fact that you must type 1 word in certain places keeps you from using an otherwise useful mode ? This word is there for clarit

Re: [fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Maciej Izak
sadly - no, only in Delphi mode. btw. this thing keep me away from objfpc. 2015-07-16 15:34 GMT+02:00 Marcos Douglas: > Hi, > > Is there some way to write this: Best regards Maciej Izak ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org htt

[fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

2015-07-16 Thread Marcos Douglas
Hi, Is there some way to write this: type generic ICloneable = interface function Clone: T; end; ...using this sintaxe: type ICloneable = interface function Clone: T; end; Because I would like to use: TFoo = class(ICloneable) ...instead use: TFoo = class(specialize ICloneable)