Re: [fpc-pascal] about interface and multiple inheritance

2015-02-24 Thread Michael Van Canneyt
On Tue, 24 Feb 2015, Jonas Maebe wrote: On 24 Feb 2015, at 16:41, Bee wrote: This is an interesting article about interface and multiple inheritance in Java. http://blog.cleancoder.com/uncle-bob/2015/01/08/InterfaceConsideredHarmful.html I wonder, how modern Pascal (FreePascal in particul

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-24 Thread Sven Barth
Am 24.02.2015 16:38 schrieb "Marco van de Voort" : > > In our previous episode, Michael Schnell said: > > On this behalf, "Application.QueuAsyncCall" is more versatile. > > > > But it's easy with TThread.Queue, as well. > > > > - define a class (not to be derived from TThread) that holds the dat

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-24 Thread Sven Barth
Am 24.02.2015 14:41 schrieb "Michael Schnell" : > > On 02/24/2015 11:32 AM, Mattias Gaertner wrote: >> >> About closures see for example: >> https://en.wikipedia.org/wiki/Closure_%28computer_programming%29 >> > Hence the "pure" closure paradigm does not need object-orientation. > > For my feeling i

Re: [fpc-pascal] about interface and multiple inheritance

2015-02-24 Thread Marco van de Voort
In our previous episode, Bee said: > > http://blog.cleancoder.com/uncle-bob/2015/01/08/InterfaceConsideredHarmful.html > > I wonder, how modern Pascal (FreePascal in particular) answer the > questions. :) I don't actually see questions why you shouldn't have interfaces. I only see reasons in tho

Re: [fpc-pascal] about interface and multiple inheritance

2015-02-24 Thread Jonas Maebe
On 24 Feb 2015, at 16:41, Bee wrote: This is an interesting article about interface and multiple inheritance in Java. http://blog.cleancoder.com/uncle-bob/2015/01/08/InterfaceConsideredHarmful.html I wonder, how modern Pascal (FreePascal in particular) answer the questions. :) Couldn't he

[fpc-pascal] about interface and multiple inheritance

2015-02-24 Thread Bee
Hi, This is an interesting article about interface and multiple inheritance in Java. http://blog.cleancoder.com/uncle-bob/2015/01/08/InterfaceConsideredHarmful.html I wonder, how modern Pascal (FreePascal in particular) answer the questions. :) Regards, -- -Bee- __

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-24 Thread Marco van de Voort
In our previous episode, Michael Schnell said: > On this behalf, "Application.QueuAsyncCall" is more versatile. > > But it's easy with TThread.Queue, as well. > > - define a class (not to be derived from TThread) that holds the data > to be transferred and a procedure without parameters > -

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-24 Thread Michael Schnell
On 02/24/2015 11:32 AM, Mattias Gaertner wrote: About closures see for example: https://en.wikipedia.org/wiki/Closure_%28computer_programming%29 Hence the "pure" closure paradigm does not need object-orientation. For my feeling it is prone to introduce some contradiction to object-orientation

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-24 Thread Sven Barth
Am 24.02.2015 11:24 schrieb "Michael Schnell" : > > On 02/24/2015 11:12 AM, Sven Barth wrote: >> >> >> >> AFAIK Delphi doesn't use the term "closures" though conceptually anonymous functions (as implemented by Delphi) are one way to achieve them. >> > What is the advantage of using a "closure" and/

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-24 Thread Mattias Gaertner
On Tue, 24 Feb 2015 11:23:41 +0100 Michael Schnell wrote: > On 02/24/2015 11:12 AM, Sven Barth wrote: > > > > > > AFAIK Delphi doesn't use the term "closures" though conceptually > > anonymous functions (as implemented by Delphi) are one way to achieve > > them. > > > What is the advantage of u

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-24 Thread Michael Schnell
On 02/24/2015 11:12 AM, Sven Barth wrote: AFAIK Delphi doesn't use the term "closures" though conceptually anonymous functions (as implemented by Delphi) are one way to achieve them. What is the advantage of using a "closure" and/or an "anonymous function" instead of just doing "free;" as

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-24 Thread Sven Barth
Am 24.02.2015 10:55 schrieb "Graeme Geldenhuys" < mailingli...@geldenhuys.co.uk>: > > On 2015-02-24 09:48, Mattias Gaertner wrote: > > I think what you mean is "closure". > > The functions don't need to be "anonymous" for that. > > Good to know, and thanks for correcting me. I'll read up on both in

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-24 Thread Graeme Geldenhuys
On 2015-02-24 09:48, Mattias Gaertner wrote: > I think what you mean is "closure". > The functions don't need to be "anonymous" for that. Good to know, and thanks for correcting me. I'll read up on both in the Delphi help. These language features are all new to me. Regards, - Graeme - -- fpG

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-24 Thread Mattias Gaertner
On Tue, 24 Feb 2015 09:30:37 + Graeme Geldenhuys wrote: > On 2015-02-23 19:49, Philippe Lévi wrote: > > if code in thread access a local variable (in stack) of the function > > where thread is issued ... it may access "something" which does not > > exist any more. correct? > > Good question,

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-24 Thread Michael Schnell
On 02/23/2015 06:58 PM, Graeme Geldenhuys wrote: Continuing on the TThread.Queue subject - is there any way to pass parameters (or record structure with basic types) to the Queue() call? On this behalf, "Application.QueuAsyncCall" is more versatile. But it's easy with TThread.Queue, as well.

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-24 Thread Michael Schnell
On 02/23/2015 06:50 PM, Graeme Geldenhuys wrote: Why not add it to the Wiki then, so your efforts would not have been wasted. IMHO, as long as there is no commonly agreed and easy and to use procedure, quickly creating publicly available online and offline usable help texts for fpc and for Laza

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-24 Thread Michael Schnell
On 02/23/2015 06:50 PM, Graeme Geldenhuys wrote: On 2015-02-23 11:25, Michael Schnell wrote: Let me know if you want to have it. Yeah please. You can email it to this email address. I hope I sent all necessary files... have fun, -Michael EventTest.tar.gz Description: GNU Zip compressed d

Re: [fpc-pascal] TThread.Queue vs TThread.Synchronize

2015-02-24 Thread Graeme Geldenhuys
On 2015-02-23 19:49, Philippe Lévi wrote: > if code in thread access a local variable (in stack) of the function > where thread is issued ... it may access "something" which does not > exist any more. correct? Good question, and what I was trying to get at with my second question on TThread.Queue