On 03/26/2011 12:28 PM, Mattias Gaertner wrote:
On Sat, 26 Mar 2011 11:06:48 +0200
Graeme Geldenhuys<[email protected]> wrote:
On 25 March 2011 23:55, Mattias Gaertner<nc-gaertnma@****> wrote:
If you don't know the purpose of a variable, why change it?
Well you know programmers, especially 'newbie' ones... They sometimes
do just as dumb things as end-users. ;-)
Yes, but this is no reason to make the RTL child safe. It's a tool not
a toy.
The documentation and comment do not say that you should set it.
I haven't checked the documentation, but does it also say you
shouldn't set it. :)
I think the better question is: Has he read some documentation? And if
yes, which one make him believe to set it.
AFAIK when writing your own thread manager you must set it.
Still no excuse for a global variable. Simply registering that thread
manager with some RTL class could automatically return True if the
function IsRTLMultiThreaded(): boolean is called. Global variables are
renowned for being "unsafe" and so 80's style of developing...
improved alternative do exist now.
lol.
Changing a time critical variable to a function just to prevent
vandalism by newbies. For a moment I really thought you were serious. :)
I have to partially agree with Graeme on this point, especially that
this package was ported from Delphi. The symptoms were on the surface
unrelated to the cause. I had to debug for quite a while until I
stumbled upon the culprit IsMultiThread assignment buried deep within
10-15 units. A compile time 'read only' error would have saved me a lot
of grief.
Stephano
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus