2009/7/10 Alain Williams <a...@phcomp.co.uk>:
>
> Just to add a little fuel to this fire, should we allow the specification of 
> return
> type of functions, eg:
>
>        function int Factorial(int $num) {...}
>
> What about things that return FALSE on error, eg fgets(), something like this:
>
>        function (string, bool) fgets(resource $handle, int $length) { ... }
>
> I suspect that it makes things too complicated.
>
> --
> Alain Williams
> Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT 
> Lecturer.
> +44 (0) 787 668 0256  http://www.phcomp.co.uk/
> Parliament Hill Computers Ltd. Registration Information: 
> http://www.phcomp.co.uk/contact.php
> Past chairman of UKUUG: http://www.ukuug.org/
> #include <std_disclaimer.h>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

This would be the perfect pairing. A library utilizing strict/enforced
types would surely want to indicate explicitly the return type.



-- 
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"
ZOPA : http://uk.zopa.com/member/RQuadling

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to