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 mich...@freepascal.org wrote: On Thu, 16 Jul 2015, Marcos Douglas wrote: On Thu, Jul 16, 2015 at 11:44 AM, Michael Van Canneyt mich...@freepascal.org wrote: On Thu, 16 Jul 2015, Maciej Izak wrote: sadly - no, only in Delphi mode.

Re: [fpc-pascal] question with interfaces, hooks

2015-07-16 Thread Graeme Geldenhuys
On 2015-07-15 19:58, David Emerson wrote: Any example code that shows the power of interfaces or TAggregatedObject in a somewhat useful example? The best Interfaces usage I've ever seen was done by Joanna Carter with her MVP implementation. The articles and source code is available on my

Re: [fpc-pascal] question with interfaces, hooks

2015-07-16 Thread David Emerson
Thanks, Graeme and Sven! On 07/14/2015 11:05 PM, Sven Barth wrote: Not related to your problem, but important nevertheless: you don't need to free interface variables. They are reference counted and freed automatically at least if you don't mix a class reference (in your case to t_foo_base) and

[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 ICloneableT = interface function Clone: T; end; ...using this sintaxe: type ICloneableT = interface function Clone: T; end; Because I would like to use: TFoo = class(ICloneableTFoo) ...instead use: TFoo = class(specialize

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

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 mich...@freepascal.org 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

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 mich...@freepascal.org 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.

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 pascaldra...@googlemail.com wrote: Am 16.07.2015 16:34 schrieb Maciej Izak hnb.c...@gmail.com: sadly - no, only in Delphi mode. btw. this thing keep me away from objfpc. Then let me tell you that

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 pascaldra...@googlemail.com wrote: Am 16.07.2015 16:34 schrieb Maciej Izak hnb.c...@gmail.com: 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

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 mich...@freepascal.org 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

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 more

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 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;

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 mich...@freepascal.org wrote: On Thu, 16 Jul 2015, Marcos Douglas wrote: On Thu, Jul 16, 2015 at 11:44 AM, Michael Van Canneyt mich...@freepascal.org 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 pascaldra...@googlemail.com wrote: On 16.07.2015 18:02, Marcos Douglas wrote: [...] Yes, but do you think this is more verbose unnecessarily? Because the syntax TFooT (I mean this ) show us that is a generic, don't? This might be the case for a

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.com/927/

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 Maciej Izak
2015-07-16 17:23 GMT+02:00 Sven Barth 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 generic methods are already working in mode ObjFPC in my local

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 pascaldra...@googlemail.com: var X: strong TDictionaryweak TListInteger, 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

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 pascaldra...@googlemail.com 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

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 pascaldra...@googlemail.com 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

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

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 silviop...@gmail.com 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 ___

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 pascaldra...@googlemail.com wrote: On 16.07.2015 22:17, Maciej Izak wrote: 2015-07-16 17:23 GMT+02:00 Sven Barth pascaldra...@googlemail.com mailto:pascaldra...@googlemail.com: Then let me tell you that generic methods will arrive in mode

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 mich...@freepascal.org wrote: On Thu, 16 Jul 2015, Maciej Izak wrote: 2015-07-16 17:23 GMT+02:00 Sven Barth pascaldra...@googlemail.com: Then let me tell you that generic methods will arrive in mode ObjFPC (and thus its syntax)

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 silviop...@gmail.com 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 -

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 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 generic