Re: Return type hints

From: Date: Mon, 07 Apr 2008 17:59:20 +0000
Subject: Re: Return type hints
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-36856@lists.php.net to get a copy of this message
Hi!
Right if at all I would agree on having a type hint "scalar", but not a separate one per type.
IMO (as already was discussed like 10 times?) "scalar" makes no sense. It doesn't save you any checks, and doesn't provide any useful information and can't perform any useful conversions, etc. for you. BTW, the statement to usefulness of "scalar" is that no C API function ever needed "scalar" as parameter type - and while we had a lot of formats for zend_parse_parameters, including objects, arrays, resources, numbers, strings of various kinds, callbacks, etc., we don't have "scalar" one. I consider it a strong indication that this idea is not as good as it might seem. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#36856) next »