[fpc-pascal] why connect is "deprecated"

Tomas Hajny XHajT03 at hajny.biz
Thu Apr 18 17:43:07 CEST 2013


On Thu, April 18, 2013 13:46, Marco van de Voort wrote:
> In our previous episode, Jonas Maebe said:
 .
 .
>> > That would also make it possible to directly map socketerror to
>> > getlastresult/fpgeterrno, instead of caching it in another threadvar.
>>
>> IIRC the problem with removing socketerror would be that it could
>> easily break existing code (given that socketerror is not overwritten
>> by calls other than those from the sockets unit).
>
> True. And that behaviour was never deprecated because "socketerror" was
> considered needed to abstract socket errors in an OS dependent manner when
> sockets also was expanded to be supported on Windows.

Correct - GetLastError is not supported on all platforms (OS/2, Netware,
GO32v2, etc.) because the concept is simply not portable to platforms
maintaining information about last error states at the level of different
subsystems rather than having single place for everything ranging from
basic I/O (console, disk devices) through (possibly different) GUI
layer(s)/implementations and various network communication layers up to an
e-shop implementation ( ;-) ) as soon as it becomes shipped and marketed
as part of the operating system.

Tomas





More information about the fpc-pascal mailing list