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] Comparison FPC 2.6.2 - Delphi 7

2013-03-04 Thread Ivanko B
C users and developers are trained in this, and have their experience in detangling the web of deps etc, have developed semi-automated helper tools etc. --- Inflicting this on the Pascal masses is unrealistic and undesirable. == 100% ! C(++) building system is a nightmare. I

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] Comparison FPC 2.6.2 - Delphi 7

2013-03-04 Thread Henry Vermaak
On Mon, Mar 04, 2013 at 09:25:02PM +0100, Marco van de Voort wrote: > In our previous episode, Henry Vermaak said: > > > > I just add all the objects to a variable in a Makefile. > > > > > > > > The result is that I have a 27000 line c library that compiles in *half* > > > > the time it takes to c

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
I have never attempted to use it in wine. It is at current for Windows only, and is a prerelease. Here are however couple of very old snapshots. They are ~2 months old and miss a lot of new features, but will give you idea. http://www.mitov.com/OpenWireIDENewRunning.png http://www.mitov.com/Ope

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Boian Mitov
Cool :-). BTW: When you implement it, please consider making it available for attributes! The Delphi version really sucks in this :-( . I have not been able to do things like: [TComponentDialog( procedure( AInstance : TComponent) begin TMyComponnt( AInstance ).ShowDialog(); end

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Boian Mitov
I actually looked at it few years ago. I also bought one of the Digital Mars CDs and still have it. It was at the time garbage collected, and this is a major No No in my book ;-) . With best regards, Boian Mitov --- Mitov Software www.mitov.com

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.
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. By the way, given your tastes, you might want to have a look a the D language. It's my favorite se

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
Correct :-) . Now back to running it ;-) . Cheers! See what I am cooking next: http://www.mitov.com/OpenWireIDE.zip Enjoy! :-D With best regards, Boian Mitov --- Mitov Software www.mitov.com ---

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] Comparison FPC 2.6.2 - Delphi 7

2013-03-04 Thread Marco van de Voort
In our previous episode, Henry Vermaak said: > > > I just add all the objects to a variable in a Makefile. > > > > > > The result is that I have a 27000 line c library that compiles in *half* > > > the time it takes to compile a 4000 line lazarus program because my c > > > lib can be built with ma

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Florian Klämpfl
Am 04.03.2013 13:22, schrieb Martin Schreiber: > On Monday 04 March 2013 12:05:37 Florian Klämpfl wrote: >> Am 04.03.2013 01:00, schrieb Graeme Geldenhuys: >>> 4.4 seconds (Kylix under Linux) vs 89 seconds (FPC under Linux)... That >>> is just too a huge performance difference to justify. Yes, we a

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Florian Klämpfl
Am 04.03.2013 20:35, schrieb Ivanko B: > I am not so sure about this. > === > Hmm - 20 (!) times (!!) difference. Usually it means design flaws thus > broad ways for improvements & reworks. Awaiting your patches. ___ fpc-deve

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Ivanko B
I am not so sure about this. === Hmm - 20 (!) times (!!) difference. Usually it means design flaws thus broad ways for improvements & reworks. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.or

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Boian Mitov
Then why do you think I am wasting my time writing all this? I really want to support Lazarus, but that is not even remotely possible today. I have well over 4 mln. lines of code and I need to support Delphi and C++ Builder with it. I will surely not abandon my current customer base just to rewr

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
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 products support C++ and C#). I have made som

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Boian Mitov
No need Michael, Thank you :-) . I am actually a master in it, as you can probably guess from our products :-D . Indeed this new language is a "witchcraft", since it will not even have classes, structures, or even statements :-D . It is a totally new concept ;-) . But it will take few years to

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Martin Schreiber
On Monday 04 March 2013 14:54:01 Mattias Gaertner wrote: > On Mon, 4 Mar 2013 14:50:17 +0100 > > Martin Schreiber wrote: > > On Monday 04 March 2013 07:08:25 Martin Schreiber wrote: > > > Both Delphi 7 and Kylix 3 compiled MSEide feel more snappy than their > > > FPC counterpart which is especiall

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Martin Schreiber
On Monday 04 March 2013 18:16:03 Mattias Gaertner wrote: > > Yes. The time is from pressing enter with "mseide" respective "mseidefp" > > on the the commandline until the last line of MacOSAll.pas from FPC 2.4.0 > > in the source editor window is colored. MSEide first shows the file > > without co

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
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 functional language, and can't even be called

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Mattias Gaertner
On Mon, 4 Mar 2013 17:34:37 +0100 Martin Schreiber wrote: > On Monday 04 March 2013 15:19:56 Tomas Hajny wrote: > > > > > > Any idea, why FPC Linux is slower than FPC Windows? > > > Loading and highlighting does not sound like a task where many OS calls > > > are involved. > > > > Is the "startin

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Boian Mitov
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.) Other than being more difficult to read it is otherwise the same. If you can also pass pointers to it that exist a

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
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 :-D . With best regards, Boian Mitov -

Re: [fpc-devel] Comparison FPC 2.6.2 - Delphi 7

2013-03-04 Thread Henry Vermaak
On Mon, Mar 04, 2013 at 11:19:38AM +0100, Marco van de Voort wrote: > In our previous episode, Henry Vermaak said: > > > Manually maintaining dependencies between compilation units is stone-age. > > > > I just add all the objects to a variable in a Makefile. > > > > The result is that I have a 27

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Boian Mitov
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. With best regards, Boian Mitov

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] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread luiz americo pereira camara
2013/3/4 Daniël Mantione : > > > Op Mon, 4 Mar 2013, schreef luiz americo pereira camara: > > >> Is the bigger code just a side effect of a cross platform RTL or the >> generated code is really bigger / slower? > [..] > > Code generation quality is another factor. While FPC has in absolute terms

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Martin Schreiber
On Monday 04 March 2013 15:19:56 Tomas Hajny wrote: > > > > Any idea, why FPC Linux is slower than FPC Windows? > > Loading and highlighting does not sound like a task where many OS calls > > are involved. > > Is the "starting MSEide" (as mentioned above) bit included in the measured > time? That w

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] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Graeme Geldenhuys
On 2013-03-04 15:53, Sven Barth wrote: > Then I'll commit my changes :) Thanks for your efforts Sven. Regards, - Graeme - ___ 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 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

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Daniël Mantione
Op Mon, 4 Mar 2013, schreef luiz americo pereira camara: Is the bigger code just a side effect of a cross platform RTL or the generated code is really bigger / slower? There are again multiple reasons. One is indeed that the code is multiple-platform and therefore some abstraction exist in

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread luiz americo pereira camara
2013/3/4 Martin Schreiber : > On Monday 04 March 2013 00:29:51 Vittorio Giovara wrote: > >> Could be interesting to see the speed and size of the binary produced >> by the two compilers, slower compilation time over faster or smaller >> code is something I would pick any time! >> > Please note that

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Sven Barth
Am 04.03.2013 16:51, schrieb Florian Klämpfl: Am 04.03.2013 15:40, schrieb Graeme Geldenhuys: On 2013-03-04 12:44, Sven Barth wrote: that really contain class helpers). Maybe we can add an additional "has_operators" flag and ignore all units when searching for overloads that don't have this fla

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Sven Barth
Am 04.03.2013 16:38, schrieb Daniël Mantione: Op Mon, 4 Mar 2013, schreef Sven Barth: It seems that I only achived around 0.1 to 0.2 seconds when compiling the compiler (manually, with -B). But it's now checking only unit System and unit constexp (part of the compiler) for operator overloads

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Florian Klämpfl
Am 04.03.2013 15:40, schrieb Graeme Geldenhuys: > On 2013-03-04 12:44, Sven Barth wrote: >> that really contain class helpers). Maybe we can add an additional >> "has_operators" flag and ignore all units when searching for overloads >> that don't have this flag set (the flag would propagate from

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Florian Klämpfl
Am 04.03.2013 15:33, schrieb Mattias Gaertner: > But I was talking about operator overloads. AFAIK there far less > operator overloads. And if a unit uses operator > overloads, then usually only a few, but many times. > I guess many units do not use overloaded operators at all. > > Is it possible

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Daniël Mantione
Op Mon, 4 Mar 2013, schreef Sven Barth: It seems that I only achived around 0.1 to 0.2 seconds when compiling the compiler (manually, with -B). But it's now checking only unit System and unit constexp (part of the compiler) for operator overloads. It's also interesting to see that not every

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Sven Barth
Am 04.03.2013 16:16, schrieb Sven Barth: Am 04.03.2013 14:31, schrieb Sven Barth: Am 04.03.2013 13:46, schrieb Michael Van Canneyt: On Mon, 4 Mar 2013, Sven Barth wrote: Am 04.03.2013 13:38, schrieb Daniël Mantione: 1. Operator overloading Operators are some of the most common tokens in s

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Sven Barth
Am 04.03.2013 14:31, schrieb Sven Barth: Am 04.03.2013 13:46, schrieb Michael Van Canneyt: On Mon, 4 Mar 2013, Sven Barth wrote: Am 04.03.2013 13:38, schrieb Daniël Mantione: 1. Operator overloading Operators are some of the most common tokens in source code. Without operator overloading,

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread 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 correctly typecheck its code > (after all we

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Martin
On 04/03/2013 14:49, Sven Barth wrote: Am 04.03.2013 15:42, schrieb Martin: but (4) is powerful enough to really make functional-style programming practically I can live with that. I find it odd so that "as" is used in the reverse order compared to current use. The use of "as" is based o

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Alexander Klenin
On Tue, Mar 5, 2013 at 1:28 AM, Michael Van Canneyt wrote: > Pascal is declarative, Please... no, Pascal is not declarative, and we have establised that fact just about two weeks ago. >not functional. >Trying to import elements from the second into the first is misguided. Pascal is also procedura

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Mattias Gaertner wrote: On Mon, 4 Mar 2013 15:02:34 +0100 (CET) Michael Van Canneyt wrote: On Mon, 4 Mar 2013, Mattias Gaertner wrote: On Mon, 4 Mar 2013 14:50:17 +0100 Martin Schreiber wrote: On Monday 04 March 2013 07:08:25 Martin Schreiber wrote: Both Delphi

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Sven Barth
Am 04.03.2013 15:42, schrieb Martin: but (4) is powerful enough to really make functional-style programming practically I can live with that. I find it odd so that "as" is used in the reverse order compared to current use. The use of "as" is based on an idea of mine. C# for example has "=

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Martin
On 04/03/2013 14:09, Alexander Klenin wrote: On Mon, Mar 4, 2013 at 10:34 PM, Martin wrote: Nevertheless, I agree what the implementation plan can be detailed even further: 1) Anonymous procedures *without* closures -- basically, just another syntax for nested procedures. That might be inter

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Graeme Geldenhuys
On 2013-03-04 12:44, Sven Barth wrote: > that really contain class helpers). Maybe we can add an additional > "has_operators" flag and ignore all units when searching for overloads > that don't have this flag set (the flag would propagate from the See, so Martin posting performance results afte

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Mattias Gaertner
On Mon, 4 Mar 2013 15:28:07 +0100 (CET) Michael Van Canneyt wrote: >[...] > I play chess. The rules of chess have not evolved in a long time. > It doesn't make the game less popular or interesting to those that play it. Actually, yes it does. ;) > I dare you to propose a new movement or a new p

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Mattias Gaertner
On Mon, 4 Mar 2013 15:00:30 +0100 (CET) Daniël Mantione wrote: > > > Op Mon, 4 Mar 2013, schreef Mattias Gaertner: > > > On Mon, 4 Mar 2013 14:37:40 +0100 (CET) > > Daniël Mantione wrote: > > > >> > >> > >> Op Mon, 4 Mar 2013, schreef Mattias Gaertner: > >> > >>> Can this be cached? > >>> May

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: > > Any idea, why FPC Linux is slower than FPC Windows? > > Loading and highlighting does not sound like a task where many OS calls > > are involved. > > Codepage conversions, most likely: Martin uses UTF-16 everywhere. > On Windows, FPC uses the

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Marco van de Voort
In our previous episode, Sven Barth said: > >>> widestrings are not reference counted. > >>> > >> Some more tests, starting MSEide, loading and highlighting the 277441 lines > >> MacOSAll.pas from FPC 2.4.0: > >> > >> FPC 2.6.2 Windows 3.2..3.5s > >> Delphi 7 Windows 4.0s > >> FPC 2.6.2 Linux

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Michael Van Canneyt
On Tue, 5 Mar 2013, Alexander Klenin wrote: 4) With both "lambda" and "as" syntax: ATree.VisitPreorder(lambda TVisitor as X + 5); Now, my argument is that (2) does indeed have only a marginal advantage over (1), but (4) is powerful enough to really make functional-style programming practical

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Graeme Geldenhuys
Thanks for taking the time with your detailed explanation. Regards, G. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Mattias Gaertner
On Mon, 4 Mar 2013 15:02:34 +0100 (CET) Michael Van Canneyt wrote: > > > On Mon, 4 Mar 2013, Mattias Gaertner wrote: > > > On Mon, 4 Mar 2013 14:50:17 +0100 > > Martin Schreiber wrote: > > > >> On Monday 04 March 2013 07:08:25 Martin Schreiber wrote: > >>> > >>> Both Delphi 7 and Kylix 3 comp

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Tomas Hajny
On Mon, March 4, 2013 14:54, Mattias Gaertner wrote: > On Mon, 4 Mar 2013 14:50:17 +0100 > Martin Schreiber wrote: > >> On Monday 04 March 2013 07:08:25 Martin Schreiber wrote: >> > >> > Both Delphi 7 and Kylix 3 compiled MSEide feel more snappy than their >> FPC >> > counterpart which is especial

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Graeme Geldenhuys
On 2013-03-04 13:05, Michael Van Canneyt wrote: > > And the first to use anonymous functions in FPC distributed code, > I will personally make him eat his keyboard. Without pepper and salt. Thank you!! :) Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pasca

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Graeme Geldenhuys
On 2013-03-04 11:17, Martin wrote: > > I added: > - the name "Bar" > - Used is at reference > - the keyword "closure" > > The above code would then create the exact same closure, as your code > does. And it does not need an anonymous method. +1 Much better solution, an in my opinion, much e

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Alexander Klenin
On Mon, Mar 4, 2013 at 10:34 PM, Martin wrote: > Nevertheless, I agree what the implementation plan can be detailed even > further: > 1) Anonymous procedures *without* closures -- basically, just another > syntax for nested procedures. > > That might be interested for mode Delphi No, this would be

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Mattias Gaertner wrote: On Mon, 4 Mar 2013 14:50:17 +0100 Martin Schreiber wrote: On Monday 04 March 2013 07:08:25 Martin Schreiber wrote: Both Delphi 7 and Kylix 3 compiled MSEide feel more snappy than their FPC counterpart which is especially surprising for Delphi be

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Daniël Mantione
Op Mon, 4 Mar 2013, schreef Mattias Gaertner: On Mon, 4 Mar 2013 14:37:40 +0100 (CET) Daniël Mantione wrote: Op Mon, 4 Mar 2013, schreef Mattias Gaertner: Can this be cached? Maybe the compiler can reuse some results? No. The symtable lookups can be parsed, but the candidate selection

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Mattias Gaertner
On Mon, 4 Mar 2013 14:50:17 +0100 Martin Schreiber wrote: > On Monday 04 March 2013 07:08:25 Martin Schreiber wrote: > > > > Both Delphi 7 and Kylix 3 compiled MSEide feel more snappy than their FPC > > counterpart which is especially surprising for Delphi because Delphi > > widestrings are not r

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Sven Barth
Am 04.03.2013 14:57, schrieb Martin Schreiber: On Monday 04 March 2013 14:37:40 Daniël Mantione wrote: Originally the compiler was doing the candidate selection with a simple loop through the parameters that took the first suitable match. When the type conversion matters became more complex the

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Sven Barth
Am 04.03.2013 14:48, schrieb Marco van de Voort: In our previous episode, Martin Schreiber said: Both Delphi 7 and Kylix 3 compiled MSEide feel more snappy than their FPC counterpart which is especially surprising for Delphi because Delphi widestrings are not reference counted. Some more tests

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Martin Schreiber
On Monday 04 March 2013 14:37:40 Daniël Mantione wrote: > Originally the compiler was doing the candidate selection with a simple > loop through the parameters that took the first suitable match. When the > type conversion matters became more complex the "Unable to determine > overloaded procedure

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Mattias Gaertner
On Mon, 4 Mar 2013 14:37:40 +0100 (CET) Daniël Mantione wrote: > > > Op Mon, 4 Mar 2013, schreef Mattias Gaertner: > > > Can this be cached? > > Maybe the compiler can reuse some results? > > No. The symtable lookups can be parsed, but the candidate selection, which > I believe is actually m

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Marco van de Voort
In our previous episode, Martin Schreiber said: > > Both Delphi 7 and Kylix 3 compiled MSEide feel more snappy than their FPC > > counterpart which is especially surprising for Delphi because Delphi > > widestrings are not reference counted. > > > Some more tests, starting MSEide, loading and highl

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Sven Barth
Am 04.03.2013 14:40, schrieb Daniël Mantione: Op Mon, 4 Mar 2013, schreef Sven Barth: Did you work out the concept somewhere? It quite likely there is some archived copy of it in the old CVS repository, but I am sure it's better to start from scratch. The compiler was still using objects

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Martin Schreiber wrote: On Monday 04 March 2013 07:08:25 Martin Schreiber wrote: Both Delphi 7 and Kylix 3 compiled MSEide feel more snappy than their FPC counterpart which is especially surprising for Delphi because Delphi widestrings are not reference counted. Some mo

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Martin Schreiber
On Monday 04 March 2013 07:08:25 Martin Schreiber wrote: > > Both Delphi 7 and Kylix 3 compiled MSEide feel more snappy than their FPC > counterpart which is especially surprising for Delphi because Delphi > widestrings are not reference counted. > Some more tests, starting MSEide, loading and high

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Mattias Gaertner
On Mon, 4 Mar 2013 14:18:09 +0100 (CET) mar...@stack.nl (Marco van de Voort) wrote: > In our previous episode, Mattias Gaertner said: > > > are 50 units loaded, this means 50 symtable lookups, simply because the > > > operator might be overloaded. > > > > Is there no cache? > > Something like: G

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Daniël Mantione
Op Mon, 4 Mar 2013, schreef Sven Barth: Did you work out the concept somewhere? It quite likely there is some archived copy of it in the old CVS repository, but I am sure it's better to start from scratch. The compiler was still using objects at that time, for example. Daniël

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Daniël Mantione
Op Mon, 4 Mar 2013, schreef Mattias Gaertner: Can this be cached? Maybe the compiler can reuse some results? No. The symtable lookups can be parsed, but the candidate selection, which I believe is actually more compute intensive, is dependend on the actual situation where the operator is c

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Sven Barth
Am 04.03.2013 14:28, schrieb Daniël Mantione: Op Mon, 4 Mar 2013, schreef Mattias Gaertner: Is there no cache? Something like: Give me all '+' operator overloads in all used units of interface, implementation. Actually a cache was part of my symtable redesign years ago. It never made it in

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Sven Barth
Am 04.03.2013 13:46, schrieb Michael Van Canneyt: On Mon, 4 Mar 2013, Sven Barth wrote: Am 04.03.2013 13:38, schrieb Daniël Mantione: 1. Operator overloading Operators are some of the most common tokens in source code. Without operator overloading, if you parse an operator, you simply gene

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Sven Barth
Am 04.03.2013 01:15, schrieb Graeme Geldenhuys: On 2013-03-02 19:03, vrt277 wrote: I want to implement support of Delphi anonymous methods for fpc. Just curious... why must such a feature be allowed in Object Pascal? Referring to the recent "butchering of the Object Pascal language" thread we

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Daniël Mantione
Op Mon, 4 Mar 2013, schreef Mattias Gaertner: Is there no cache? Something like: Give me all '+' operator overloads in all used units of interface, implementation. Actually a cache was part of my symtable redesign years ago. It never made it into the compiler. But it was designed with a sli

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Marco van de Voort
In our previous episode, Mattias Gaertner said: > > are 50 units loaded, this means 50 symtable lookups, simply because the > > operator might be overloaded. > > Is there no cache? > Something like: Give me all '+' operator overloads in all used units > of interface, implementation. >From what I

Re: [fpc-devel] Re: Comparison FPC 2.6.2 - Kylix 3

2013-03-04 Thread Mattias Gaertner
On Mon, 4 Mar 2013 13:38:50 +0100 (CET) Daniël Mantione wrote: >[...] > Some features only request procesing power if you use them. However, > the features in Florian's list require continuous processing power. Two > examples how features can impact overall speed: > > 1. Operator overloading >

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Martin
On 04/03/2013 12:51, Sven Barth wrote: If you guys would read what I wrote in one of my first answers to Vasiliy in this thread than you would know that I want him to implement this possiblity as well... but after all, who reads the mails of some strange computer science student who just happen

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Michael Van Canneyt
On Mon, 4 Mar 2013, Sven Barth wrote: Am 04.03.2013 13:23, schrieb Michael Van Canneyt: On Mon, 4 Mar 2013, Mattias Gaertner wrote: On Mon, 04 Mar 2013 11:17:53 + Martin wrote: On 04/03/2013 04:54, Boian Mitov wrote: Here is example: Parallel execution with selection of executor:

Re: [fpc-devel] Delphi anonymous methods

2013-03-04 Thread Sven Barth
Am 04.03.2013 13:23, schrieb Michael Van Canneyt: On Mon, 4 Mar 2013, Mattias Gaertner wrote: On Mon, 04 Mar 2013 11:17:53 + Martin wrote: On 04/03/2013 04:54, Boian Mitov wrote: Here is example: Parallel execution with selection of executor: for i := 0 to AMaxScaleIndex - 1 do beg

  1   2   >