Re: [fpc-devel] Delphi anonymous methods

2013-03-07 Thread Alexander Shishkin
03.03.2013 2:22, Sven Barth пишет: On 02.03.2013 20:55, Sven Barth wrote: Also there are open questions which require brainstorm: 1. Does Pascal needs other implementation of closures which is different from anonymous methods implementation? I would say no. After all the method implementation

Re: [fpc-devel] Delphi anonymous methods

2013-03-06 Thread Roberto P.
{$MODE MINE} would suit as well :-) 2013/3/6 Thaddy > {$MODE SUBJECTIVE} is more appropriate in this discussion. > > But i am by -first - education a political scientist. > > > On 6-3-2013 15:44, Michael Schnell wrote: > >> On 03/06/2013 02:37 PM, Sven Barth wrote: >> >>> What exactly do you me

Re: [fpc-devel] Delphi anonymous methods

2013-03-06 Thread Thaddy
{$MODE SUBJECTIVE} is more appropriate in this discussion. But i am by -first - education a political scientist. On 6-3-2013 15:44, Michael Schnell wrote: On 03/06/2013 02:37 PM, Sven Barth wrote: What exactly do you mean? we already have: {$MODE FPC} {$MODE OBTP} {$MODE DELPHI} {$MODE OBJFP

Re: [fpc-devel] Delphi anonymous methods

2013-03-06 Thread Sven Barth
Am 06.03.2013 15:19, schrieb Graeme Geldenhuys: On 2013-03-05 13:02, Sven Barth wrote: Two words: backwards compatibility. To Turbo Pascal yes (ie: tp mode), but surely not ObjFPC? You must not forget that mode ObjFPC isn't the youngest one either. If we'd freshly design that mode I'd agree wi

Re: [fpc-devel] Delphi anonymous methods

2013-03-06 Thread Michael Schnell
On 03/06/2013 02:37 PM, Sven Barth wrote: What exactly do you mean? we already have: {$MODE FPC} {$MODE OBTP} {$MODE DELPHI} {$MODE OBJFPC} {$MODE OBJMAC} if {$MODE OBJMAC} not already is for objective Pascal there could be something like {$MODE OBJECTIVE} -Michael

Re: [fpc-devel] Delphi anonymous methods

2013-03-06 Thread Graeme Geldenhuys
On 2013-03-05 13:02, Sven Barth wrote: >> > Two words: backwards compatibility. To Turbo Pascal yes (ie: tp mode), but surely not ObjFPC? Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ _

Re: [fpc-devel] Delphi anonymous methods

2013-03-06 Thread Sven Barth
Am 06.03.2013 14:35, schrieb Michael Schnell: On 03/06/2013 01:45 PM, Sven Barth wrote: There is a mode that's compatible to Mac Pascal, but the Objective Pascal is independant of the mode, but is triggered by a modeswitch (as it was specially developed by the FPC and the Mac Pascal communitie

Re: [fpc-devel] Delphi anonymous methods

2013-03-06 Thread Michael Schnell
On 03/06/2013 01:45 PM, Sven Barth wrote: There is a mode that's compatible to Mac Pascal, but the Objective Pascal is independant of the mode, but is triggered by a modeswitch (as it was specially developed by the FPC and the Mac Pascal communities). Would it not be nice and more straightfor

Re: [fpc-devel] Delphi anonymous methods

2013-03-06 Thread Sven Barth
Am 06.03.2013 11:57, schrieb Michael Schnell: On 03/05/2013 08:52 PM, Graeme Geldenhuys wrote: Good thing is, most of these are kept in the 'delphi' compiler mode. The 'objfpc' mode normally get some more pascal love. +1 AFAIK there is an Apple specific Objective Pascal mode, as well. I think

Re: [fpc-devel] Delphi anonymous methods

2013-03-06 Thread Michael Schnell
On 03/06/2013 01:54 AM, Frank Church wrote: I have observed a lot of Delphi developers who have written code that needs or depends on the features like anonymous methods, generics, RTTI or Strings :-[ give up porting to FPC because it proved too difficult, but then it turns out those libraries

Re: [fpc-devel] Delphi anonymous methods

2013-03-06 Thread Michael Schnell
On 03/05/2013 08:52 PM, Graeme Geldenhuys wrote: Good thing is, most of these are kept in the 'delphi' compiler mode. The 'objfpc' mode normally get some more pascal love. +1 AFAIK there is an Apple specific Objective Pascal mode, as well. I think it's really nice to have multiple compilers in

Re: [fpc-devel] Delphi anonymous methods

2013-03-06 Thread Michael Fuchs
Am 05.03.2013 14:02, schrieb Sven Barth: You can disable this construct with: http://www.freepascal.org/docs-html/prog/progsu42.html This should be the default in ObjFpc mode. Two words: backwards compatibility. For every version of fpc exists an user changes list, containing items which b

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Frank Church
I have observed a lot of Delphi developers who have written code that needs or depends on the features like anonymous methods, generics, RTTI give up porting to FPC because it proved too difficult, but then it turns out those libraries could greatly enhance FPC usage. So I think this bullet must b

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Boian Mitov
oian Mitov --- Mitov Software www.mitov.com --- -Original Message- From: Henry Vermaak Sent: Tuesday, March 05, 2013 2:20 PM To: FPC developers' list Subject: Re: [fpc-devel] Delphi anonymous methods You sure have a lot

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Henry Vermaak
On Tue, Mar 05, 2013 at 09:56:21AM -0800, Boian Mitov wrote: > Hi Henry, > > Interesting that you consider me a Delphi fanboy :-D . > I don't like it much, but I surely love the anonymous methods :-D . > I love the C++11 implementation of anonymous methods more however, > but I hate the lack of ex

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Graeme Geldenhuys
On 2013-03-05 15:24, Marcos Douglas wrote: > > Why follow the Delphi even knowing that is the wrong way to implement > something? Because like the FPC team have said a million times to me because they follow Delphi blindly, and WILL do everything to stay "delphi compatible". Good thing is,

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Boian Mitov
: Tuesday, March 05, 2013 3:30 AM To: FPC developers' list Subject: Re: [fpc-devel] Delphi anonymous methods It is hard to parse for humans as well as for the compiler. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepasca

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Boian Mitov
#x27; list Subject: Re: [fpc-devel] Delphi anonymous methods And with the attitude of, e.g. Boian, we see that it's simply too hard to please hard-core delphi fanboys. They're all "take" and no "give". I look forward to the day when the fpc developers will realise that pl

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Boian Mitov
--- Mitov Software www.mitov.com --- -Original Message- From: Michael Van Canneyt Sent: Monday, March 04, 2013 11:51 PM To: FPC developers' list Subject: Re: [fpc-devel] Delphi anonymous methods A

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread waldo kitty
On 3/5/2013 04:20, Graeme Geldenhuys wrote: On 2013-03-04 20:33, Howard Page-Clark wrote: You can simulate this in FPC as well as TP by using a local typed constant. e.g. function GetValue: integer; const value: integer = 0; begin Inc(value); Result:= value; end; I've seen this befo

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread waldo kitty
On 3/4/2013 15:33, Howard Page-Clark wrote: On 04/03/13 6:34, waldo kitty wrote: i'm trying to understand what you mean by > Pascal don't allows to create static variables inside function > like in c-like languages. i've done something that i think is what you speak of but it was in Borland's

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Marcos Douglas
On Tue, Mar 5, 2013 at 11:46 AM, Paul Ishenin wrote: > 05.03.13, 21:00, Marcos Douglas пишет: > >> So now we have 7! ;-) >> I want to keep the language sane too. > > > I wrote not about sane/insane. Delphi adds features to pascal the way they > want - this is reality. We can't do anything with th

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Florian Klaempfl
Am 05.03.2013 11:10, schrieb Paul Ishenin: 05.03.13, 17:55, Sven Barth wrote: @Paul: see? :) I see you, Graeme, Michael and probably some more 5-6 developers. Even if those are the only ones, from the beginning, FPC tried to support all niches. And if someone maintaines a certain niche, th

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Paul Ishenin
05.03.13, 21:00, Marcos Douglas пишет: So now we have 7! ;-) I want to keep the language sane too. I wrote not about sane/insane. Delphi adds features to pascal the way they want - this is reality. We can't do anything with this. If they add a feature not the sane way we can't undo their fea

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Vasiliy Kevroletin
On 03/05/2013 05:34 AM, waldo kitty wrote: It is as I thought about closures before. But this is useless without capturing of variables by value. During creation of anonymous method you *can not bind any values* to it. Anonymous method have only references to captured variables. Pascal don't al

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Sven Barth
Am 05.03.2013 14:41, schrieb Mattias Gaertner: Sven Barth hat am 5. März 2013 um 14:27 geschrieben: [...] Please note that I wouldn't have choosen round brackets either (potential conflicts with type casting) ? Can you give an example? Forget what I wrote... As I've written in my mail to Alexa

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Sven Barth
Am 05.03.2013 14:50, schrieb Alexander Klenin: On Wed, Mar 6, 2013 at 12:27 AM, Sven Barth wrote: I don't know why the one who first implemented them chose them, but now the reason is backwards compatibility. Please note that I wouldn't have choosen round brackets either (potential conflicts w

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Alexander Klenin
On Wed, Mar 6, 2013 at 12:27 AM, Sven Barth wrote: > I don't know why the one who first implemented them chose them, but now the > reason is backwards compatibility. > > Please note that I wouldn't have choosen round brackets either (potential > conflicts with type casting) Is not "specialize" ke

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Mattias Gaertner
Sven Barth hat am 5. März 2013 um 14:27 geschrieben: >[...] > Please note that I wouldn't have choosen round brackets either > (potential conflicts with type casting) ? Can you give an example? Mattias ___ fpc-devel maillist - fpc-devel@lists.freepa

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Sven Barth
Am 05.03.2013 14:23, schrieb Alexander Klenin: On Wed, Mar 6, 2013 at 12:16 AM, Sven Barth wrote: SomeVar := SomeFunc - SomeType.SomeMethod * SomeOtherType.SomeMethod; === example end === while this will be much easier to implement: === example begin === SomeVar := specialize SomeFunc - spe

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Alexander Klenin
On Wed, Mar 6, 2013 at 12:16 AM, Sven Barth wrote: > > SomeVar := SomeFunc - SomeType.SomeMethod * > SomeOtherType.SomeMethod; > > === example end === > > while this will be much easier to implement: > > === example begin === > > SomeVar := specialize SomeFunc - specialize > SomeType.SomeMethod *

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Sven Barth
Am 05.03.2013 12:24, schrieb Marco van de Voort: In our previous episode, Sven Barth said: when Delphi announced them they had much more (you know of course). That was more a prototype of generics. But inspite of that we did not drop our own implementation. Just to say one thing clear: I will N

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Sven Barth
Am 05.03.2013 12:29, schrieb Alexander Klenin: This is why I propose the following plan: 1) Implement Delphi-like anonymous functions syntax, without closures 2) Implement Delphi-like by-reference closures 3) Implement ObjFPC-specific named closures with explicit by-value/by reference options 4)

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Sven Barth
Am 05.03.2013 12:44, schrieb Michael Fuchs: Am 05.03.2013 10:25, schrieb Michael Van Canneyt: I've seen this before, and always been baffled by this. How can you increment a "constant"? If you can, it is then a variable, no? A leftover from the TP days. A typed constant acts as an initialized

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Marcos Douglas
On Tue, Mar 5, 2013 at 7:10 AM, Paul Ishenin wrote: > 05.03.13, 17:55, Sven Barth wrote: > >> @Paul: see? :) > > > I see you, Graeme, Michael and probably some more 5-6 developers. So now we have 7! ;-) I want to keep the language sane too. Regards, Marcos Douglas __

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Michael Fuchs
Am 05.03.2013 11:10, schrieb Paul Ishenin: @Paul: see? :) I see you, Graeme, Michael and probably some more 5-6 developers. That is the problem with mailing lists. Not everybody sends a mail, just saying "+1 from me too". And so it could be "probably some more 500-600 developers". And btw

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Michael Fuchs
Am 05.03.2013 10:25, schrieb Michael Van Canneyt: I've seen this before, and always been baffled by this. How can you increment a "constant"? If you can, it is then a variable, no? A leftover from the TP days. A typed constant acts as an initialized variable. You can disable this construct wit

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Marco van de Voort
In our previous episode, Alexander Klenin said: > >> not only do we have to keep backwards compatibility, but the Delphi > >> syntax is a nightmare to parse. > > > > But you need to anyway because of mode delphi, so what is the point? > > It is hard to parse for humans as well as for the compiler.

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Alexander Klenin
On Tue, Mar 5, 2013 at 10:24 PM, Marco van de Voort wrote: >> Just to say one thing clear: I will NOT drop FPC's generic >> implementation and I'll revert every commit that tries to do so, because >> not only do we have to keep backwards compatibility, but the Delphi >> syntax is a nightmare to pa

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Alexander Klenin
On Tue, Mar 5, 2013 at 9:10 PM, Paul Ishenin wrote: > 05.03.13, 17:55, Sven Barth wrote: > > I see you, Graeme, Michael and probably some more 5-6 developers. > The level of Delphi compatibility vs. syntax quality is, as always in engineering, a matter of compromise and cost/benefit analysis. For

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Marco van de Voort
In our previous episode, Sven Barth said: > > when Delphi announced them they had much more (you know of course). > > That was more a prototype of generics. But inspite of that we did not > > drop our own implementation. > Just to say one thing clear: I will NOT drop FPC's generic > implementati

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Sven Barth
Am 05.03.2013 11:05, schrieb Henry Vermaak: On Tue, Mar 05, 2013 at 10:12:04AM +0100, Michael Van Canneyt wrote: You may think that Delphi is the best thing since sliced bread, but not everyone thinks so. And with the attitude of, e.g. Boian, we see that it's simply too hard to please hard-core

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Bernd Mueller
Paul Ishenin wrote: I remember author of Total Commander who had failed to port his project to FPC + Laz because of many incompatilities in both projects. IMHO, you are not right. the 64-bit version seems to be written in FPC/Lazarus: The string "FPC 2.5.1 [2011/12/03] for x86_64 - Win64"

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Paul Ishenin
05.03.13, 17:55, Sven Barth wrote: @Paul: see? :) I see you, Graeme, Michael and probably some more 5-6 developers. Best regards, Paul Ishenin ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Henry Vermaak
On Tue, Mar 05, 2013 at 10:12:04AM +0100, Michael Van Canneyt wrote: > You may think that Delphi is the best thing since sliced bread, > but not everyone thinks so. And with the attitude of, e.g. Boian, we see that it's simply too hard to please hard-core delphi fanboys. They're all "take" and no

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Michael Van Canneyt
On Tue, 5 Mar 2013, Paul Ishenin wrote: 05.03.13, 17:12, Michael Van Canneyt wrote: Of course we can, if you violate a basic rule: do not undo other peoples work. Can you imagine me or anybody other in FPC team who do so without total agreement? I hope not :) It does not split. It off

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Sven Barth
Am 05.03.2013 10:53, schrieb Graeme Geldenhuys: On 2013-03-05 09:12, Michael Van Canneyt wrote: You may think that Delphi is the best thing since sliced bread, but not everyone thinks so. There are several people on the list that do not like what Delphi is doing to the pascal language. +1000

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Michael Van Canneyt
On Tue, 5 Mar 2013, Paul Ishenin wrote: Think about component and applications developers who need to care about FPC and Delphi. Less incompatibilities FPC will have more 3rd party components and applications it will get. For this, mode delphi exists. I remember author of Total Commander

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Paul Ishenin
05.03.13, 17:12, Michael Van Canneyt wrote: Of course we can, if you violate a basic rule: do not undo other peoples work. Can you imagine me or anybody other in FPC team who do so without total agreement? It does not split. It offers people the choice. Again we see one thing from differ

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Graeme Geldenhuys
On 2013-03-05 09:12, Michael Van Canneyt wrote: > You may think that Delphi is the best thing since sliced bread, > but not everyone thinks so. > > There are several people on the list that do not like what Delphi is doing to > the pascal language. +1000 I think Embarcadero is butchering the Obj

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Sven Barth
Am 05.03.2013 10:41, schrieb Paul Ishenin: 05.03.13, 17:14, Sven Barth wrote: Just for your information: I will implement generic methods will full requirement for "generic" and "specialize" in mode ObjFPC (and no, you can't change my opinion on that). Yes, I didn't expect my mails will sudde

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Paul Ishenin
05.03.13, 17:14, Sven Barth wrote: Just for your information: I will implement generic methods will full requirement for "generic" and "specialize" in mode ObjFPC (and no, you can't change my opinion on that). Yes, I didn't expect my mails will suddenly change your opinion. And even if they w

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Sven Barth
Am 05.03.2013 10:20, schrieb Graeme Geldenhuys: On 2013-03-04 20:33, Howard Page-Clark wrote: You can simulate this in FPC as well as TP by using a local typed constant. e.g. function GetValue: integer; const value: integer = 0; begin Inc(value); Result:= value; end; I've seen this be

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Michael Van Canneyt
On Tue, 5 Mar 2013, Graeme Geldenhuys wrote: On 2013-03-04 20:33, Howard Page-Clark wrote: You can simulate this in FPC as well as TP by using a local typed constant. e.g. function GetValue: integer; const value: integer = 0; begin Inc(value); Result:= value; end; I've seen this be

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Graeme Geldenhuys
On 2013-03-04 20:33, Howard Page-Clark wrote: > > You can simulate this in FPC as well as TP by using a local typed > constant. e.g. > > function GetValue: integer; > const value: integer = 0; > begin >Inc(value); >Result:= value; > end; I've seen this before, and always been baffled b

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Sven Barth
Am 05.03.2013 10:12, schrieb Michael Van Canneyt: There are several people on the list that do not like what Delphi is doing to the pascal language. The way Embarcadero treats the Pascal Language I am more and more going to this camp. More so with every release of Delphi. As this thread clearl

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Sven Barth
Am 05.03.2013 09:59, schrieb Paul Ishenin: Just to say one thing clear: I will NOT drop FPC's generic implementation and I'll revert every commit that tries to do so, because Sven, relax - FPC is not your own project and not mine. We can't simple commit or revert what we want. I'm sorry tha

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Michael Van Canneyt
On Tue, 5 Mar 2013, Paul Ishenin wrote: 05.03.13, 16:30, Sven Barth wrote: Just to say one thing clear: I will NOT drop FPC's generic implementation and I'll revert every commit that tries to do so, because Sven, relax - FPC is not your own project and not mine. We can't simple commit or

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Paul Ishenin
05.03.13, 16:30, Sven Barth wrote: Just to say one thing clear: I will NOT drop FPC's generic implementation and I'll revert every commit that tries to do so, because Sven, relax - FPC is not your own project and not mine. We can't simple commit or revert what we want. not only do we have

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Michael Van Canneyt
On Tue, 5 Mar 2013, Sven Barth wrote: Am 05.03.2013 07:56, schrieb Paul Ishenin: 05.03.13, 14:10, Sven Barth wrote: ObjFPC mode is not compatible with mode Delphi, because of conscious decisions. Think for example about the "@" for procedure variable assignments here or the use of symbolic

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Michael Van Canneyt
On Tue, 5 Mar 2013, Paul Ishenin wrote: 05.03.13, 15:57, Michael Van Canneyt wrote: With such an attitude you should remove objfpc (and perhaps all non-delphi modes) alltogether, and rename Free Pascal to Free Delphi. The situation with FPC and Delphi is very like to what had happened with

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Sven Barth
Am 05.03.2013 07:56, schrieb Paul Ishenin: 05.03.13, 14:10, Sven Barth wrote: ObjFPC mode is not compatible with mode Delphi, because of conscious decisions. Think for example about the "@" for procedure variable assignments here or the use of symbolic operator names for overload declarations,

Re: [fpc-devel] Delphi anonymous methods

2013-03-05 Thread Paul Ishenin
05.03.13, 15:57, Michael Van Canneyt wrote: With such an attitude you should remove objfpc (and perhaps all non-delphi modes) alltogether, and rename Free Pascal to Free Delphi. The situation with FPC and Delphi is very like to what had happened with browsers. Every had it own vision of CSS, J

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Michael Van Canneyt
On Tue, 5 Mar 2013, Paul Ishenin wrote: 05.03.13, 14:10, Sven Barth wrote: ObjFPC mode is not compatible with mode Delphi, because of conscious decisions. Think for example about the "@" for procedure variable assignments here or the use of symbolic operator names for overload declarations,

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Michael Van Canneyt
On Tue, 5 Mar 2013, Sven Barth wrote: Am 05.03.2013 04:55 schrieb "Paul Ishenin" : > > 04.03.2013 18:29, Marco van de Voort wrote: > >> I chose the latter. Compatibility. All the way. No compromise. >> >> Is it pure? No. Is it perfect? No. Is it better than the alternative? Yes. >> >> Current

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Boian Mitov wrote: I have never attempted to use it in wine. It is at current for Windows only, and is a prerelease. A pity. Michael. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Paul Ishenin
05.03.13, 14:10, Sven Barth wrote: ObjFPC mode is not compatible with mode Delphi, because of conscious decisions. Think for example about the "@" for procedure variable assignments here or the use of symbolic operator names for overload declarations, instead of words like Delphi did it. And gen

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Sven Barth
Am 05.03.2013 04:55 schrieb "Paul Ishenin" : > > 04.03.2013 18:29, Marco van de Voort wrote: > >> I chose the latter. Compatibility. All the way. No compromise. >> >> Is it pure? No. Is it perfect? No. Is it better than the alternative? Yes. >> >> Currently FPC is much dirtier than Delphi if only b

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Paul Ishenin
04.03.2013 18:29, Marco van de Voort wrote: I chose the latter. Compatibility. All the way. No compromise. Is it pure? No. Is it perfect? No. Is it better than the alternative? Yes. Currently FPC is much dirtier than Delphi if only because it has two implementations for everything. I'm total

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Martin
On 04/03/2013 22:16, Sven Barth wrote: > The above is NOT an anonymous function. It is a reference to a term. > I am not voting for it, but IF it was done, then it should have its own keyword. > > It would not allow for var, type or anything (and it will only work for functions, not procedure

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Boian Mitov
Sent: Monday, March 04, 2013 1:39 PM To: FPC developers' list Subject: Re: [fpc-devel] Delphi anonymous methods home: >wine OpenWireIDE.exe ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Boian Mitov
--- Mitov Software www.mitov.com --- From: Sven Barth Sent: Monday, March 04, 2013 2:19 PM To: fpc-devel@lists.freepascal.org Subject: Re: [fpc-devel] Delphi anonymous methods We'll implement features of Delphi anywa

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Boian Mitov
www.mitov.com --- From: Roberto P. Sent: Monday, March 04, 2013 2:06 PM To: FPC developers' list Subject: Re: [fpc-devel] Delphi anonymous methods FPC is really an exciting and always improving language/project, but IMHO if you stretch out too much

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Sven Barth
Am 04.03.2013 23:06 schrieb "Roberto P." : > > FPC is really an exciting and always improving language/project, but IMHO if you stretch out too much from the Pascal origin and "general frame", then people will eventually get lost and abandone it. We'll implement features of Delphi anyway for compa

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Sven Barth
Am 04.03.2013 22:41 schrieb "Martin" : > > On 04/03/2013 19:16, Alexander Klenin wrote: >>> >>> See above. The omission "of Result :=" is IMHO not desirable. >> >> Are you sure? Note that *any* useful single-statement function will >> start exactly like this > > If a = x then Result := 4 else Resul

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Roberto P.
y! :-D > > > With best regards, > Boian Mitov > > --**- > Mitov Software > www.mitov.com > --**- > -Original Message- From: Michael Van Canneyt Sent: Monday, March > 04, 2013 12:41 P

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Martin
On 04/03/2013 19:16, Alexander Klenin wrote: See above. The omission "of Result :=" is IMHO not desirable. Are you sure? Note that *any* useful single-statement function will start exactly like this If a = x then Result := 4 else Result := 5; Single statement, but starts different. And is use

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Boian Mitov wrote: Correct :-) . Now back to running it ;-) . Cheers! See what I am cooking next: http://www.mitov.com/OpenWireIDE.zip home: >wine OpenWireIDE.exe p11-kit: couldn't load module: /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so: /usr/lib/i386-linux

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Boian Mitov
--- -Original Message- From: Michael Van Canneyt Sent: Monday, March 04, 2013 12:41 PM To: FPC developers' list Subject: Re: [fpc-devel] Delphi anonymous methods On Mon, 4 Mar 2013, Boian Mitov wrote: Do not get me wrong, I do not ask you to change your decision or your code

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Martin
On 04/03/2013 19:16, Alexander Klenin wrote: function NAME(PARAMS): RETURNTYPE as EXPRESSION IMHO that is not a good idea. It adds an additional construct, that every reader must know how to read. It does not add/save enough to be needed. I agree, it is borderline, and needs to be additiona

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Boian Mitov wrote: Then why do you think I am wasting my time writing all this? I should be asking this to you :-) I really want to support Lazarus, but that is not even remotely possible today. That says it all. Delphi doesn't support these 'new features' that long

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Howard Page-Clark
On 04/03/13 6:34, waldo kitty wrote: i'm trying to understand what you mean by > Pascal don't allows to create static variables inside function like in c-like > languages. i've done something that i think is what you speak of but it was in Borland's Turbo Pascal... at least TP6... i don't re

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Boian Mitov
11:12 AM To: FPC developers' list Subject: Re: [fpc-devel] Delphi anonymous methods On Mon, 4 Mar 2013, Boian Mitov wrote: But I seriously doubt that this has to do with missing anonymous functions in a delphi-compatible form. I also doubt that adding anonymous functions would make you c

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Alexander Klenin
On Tue, Mar 5, 2013 at 3:34 AM, Martin wrote: > On 04/03/2013 16:05, Alexander Klenin wrote: >> >> Anonymous functions (with good syntax, of course) fall in this category. >> The world recognized that fact -- rather slowly, to be sure, but >> remember that "while"s and "for"s >> also took decades

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Boian Mitov wrote: Hi Michael, Thank you! I actually have more experience in C++ than in Delphi. I have been using Delphi only for ~15 years, where my active C++ experience dates back to 1990, and I actively develop in C++ and C# on daily basis as well (All of our pro

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread waldo kitty
It is as I thought about closures before. But this is useless without capturing of variables by value. During creation of anonymous method you *can not bind any values* to it. Anonymous method have only references to captured variables. Pascal don't allows to create static variables inside functio

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Boian Mitov
Mitov --- Mitov Software www.mitov.com --- -Original Message- From: Michael Van Canneyt Sent: Monday, March 04, 2013 9:11 AM To: FPC developers' list Subject: Re: [fpc-devel] Delphi anonymous methods If y

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Boian Mitov
--Original Message- From: Michael Van Canneyt Sent: Monday, March 04, 2013 9:19 AM To: FPC developers' list Subject: Re: [fpc-devel] Delphi anonymous methods There is a course in witchcraft here in the neighbourhood, shall I send you the details so you can inscribe ? Sounds like

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Boian Mitov wrote: Actually you are right indeed. I would spill a secret now. I have actually been working on a new language for a while, although it indeed will not only have anonymous methods, but will not have methods altogether, since it is a non procedural and non fu

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Boian Mitov wrote: I actually somewhat agree with that, except it is less readable since you can't follow the code flow in place but have to scroll up to see what will happen (in for each as example.) If you do proper top-down programming, usually there is no need to go

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Boian Mitov
Mitov Software www.mitov.com --- -Original Message- From: Michael Van Canneyt Sent: Monday, March 04, 2013 4:23 AM To: FPC developers' list Subject: Re: [fpc-devel] Delphi anonymous methods People who want that should not be using

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Boian Mitov
Sent: Monday, March 04, 2013 9:03 AM To: FPC developers' list Subject: Re: [fpc-devel] Delphi anonymous methods On Mon, 4 Mar 2013, Boian Mitov wrote: This is not correct. For anonymous functions you do not need to declare a new class. Just name a local method. That means move a line, and

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Boian Mitov wrote: Thank you Michael, This is a good advise :-) . I guess I really should stop using Delphi in the future :-) . I am surely not using FPC and staying with Delphi for now, but I appreciate your advise. Having less people use the language is the way to go :

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Boian Mitov wrote: Ye, by writing 20 times more code for the same. What here I can do with 3 lines, otherwise needs declaration of a new class, new interface and new instance of the class. So what I can do here i 15 seconds would take me 1 hour to do traditionally. This

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Boian Mitov
--- Mitov Software www.mitov.com --- -Original Message- From: Michael Van Canneyt Sent: Monday, March 04, 2013 4:23 AM To: FPC developers' list Subject: Re: [fpc-devel] Delphi anon

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Boian Mitov
--- Mitov Software www.mitov.com --- -Original Message- From: Martin Sent: Monday, March 04, 2013 3:35 AM To: FPC developers' list Subject: Re: [fpc-devel] Delphi anonymous methods On 04/03/2013

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Martin
On 04/03/2013 16:05, Alexander Klenin wrote: Both "lambda" and "as" keywords are quite debatable, of course. IMHO the existing procedure/function keywords should be kept. But with the requirement of using a defined type Foo( function as TVisitor; Result := x+5 end; ); or Foo( function as

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Martin
On 04/03/2013 16:05, Alexander Klenin wrote: Anonymous functions (with good syntax, of course) fall in this category. The world recognized that fact -- rather slowly, to be sure, but remember that "while"s and "for"s also took decades to be accepted as standard constructs. I am not going to ask

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Sven Barth
Am 04.03.2013 16:13, schrieb Alexander Klenin: On Tue, Mar 5, 2013 at 1:49 AM, Sven Barth wrote: The use of "as" is based on an idea of mine. C# for example has "=>" and Oxygene has "->" which I didn't consider much Pascal like. Also the compiler needs to know the type of the lambda so it can

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Alexander Klenin
On Tue, Mar 5, 2013 at 2:10 AM, Martin wrote: > > First: Stressing out: I don't like it. But if we must have one, the lambda > approach is the best one yet. > Reason: At least the type is declared at a pascal-like location. I certainly agree that it is subjective in the sense that some persons do

  1   2   >