>This is an "and" not an "or". The exception is raised when FProtoStr is
>neither 'tcp' no '6'.
Aaaah, yeah, I got it. Seems my mind was too sleepy yesterday ;)
>Probably. Maybe you'll implement those features ?
I could make a try when I have some time, but it will be a kind of sketch
anyway, as I hadn't fully realised TWSocket processes and ideology yet.
>Shorter in code, but slower.
Is it?
procedure Function1;
var o: tobject;
begin
o := tobject.Create;
o.Free;
o:=nil;
if o <> nil then error(''); // use o to not let the compiler eliminate
previous line
end;
procedure Function2;
var o: tobject;
begin
o := tobject.Create;
FreeAndNil(o);
if o <> nil then error('');
end;
on 5000000 iterations I got these results (3 tests were done):
875 - 860
890 - 844
875 - 844
the values are in millisecs! So the difference is about 2 nanosec per one call
:)
>Note that this has been written at a timle where FreeAndNil didn't existed.
This reason I get indeed, but it's time to move on, no?
>The problem is that is would break existing code. On of the gold rules in
>ICS has always been and will always be to avoid as much as possible breaking
>existing code. The error message, if required, should be passed thru a
>property for example. This wouldn't break any existing code.
Of course, it is you to decide, but I don't see big troubles in some
improvements even if they would break some code (break syntatically, but not
logically!) - one will simply edit few lines and that's all. And you are
prisoning the project into a cage of old class interface, having to invent lots
of workarounds or to cancel further improvements because they will break... do
you really think it's what it should be? (everything's *imho*).
--
Anton
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be