Re: About ext/sockets/

From: Date: Sun, 24 Jun 2001 22:17:45 +0000
Subject: Re: About ext/sockets/
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-57884@lists.php.net to get a copy of this message
Sascha, PHP is an established language on its own now, with failure semantics of its own. Failure in PHP is noted by false and resource (i.e. anything which is not a language primitive or composite type) are contained in IS_RESOURCE handles. The original socket implementation was wrong in the sense that it used non-PHP semantics, thus being both non intuitive for the PHP user and inconsistent with the language. It doesn't really matter how popular the semantics it followed was; It was wrong for PHP. FWIW, from my experience, most PHP users do not come from a UNIX system programming background, not that it really matters in this case. People who use PHP should see that it is consistent, and should not be required to be familiar with Unix or Winsock APIs. Zeev At 00:18 25/6/2001, Sascha Schumann wrote:
    Jeroen,
For lower-scale and home-use you can argue it is easier than *nix. So when possible, you should try to support windows. [..]
[looked like C, was easier for ppl with C-background]
I don't think you should target php at C-ppl.
    PHP has been since its inception strongly influenced by C.
    And as a tool originally conceived on Unix, it should
    maintain its roots and continue to provide people familiar
    with Unix APIs a convenient way for scripting.
    Thus, improved Windows support should not come at the expense
    of Unix support without a perfect reason.  I'm missing that
    reason here.
    I haven't looked deeply at what API changes have been
    introduced lately, but I'd suggest to use the standard BSD
    sockets return value semantics (-1 for failure, >= 0 for
    success).  Those semantics also prevail in the Winsock
    implementation, so they should be quite natural.
    - Sascha                                     Experience IRCG
      http://schumann.cx/                http://schumann.cx/ircg
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
-- Zeev Suraski <zeev@zend.com> CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/

« previous php.dev (#57884) next »