Just a random thought I have from reading over that:

Would it not be more 'natural' to change 'function' to indicate a
method with a variant return type, and allow e.g.

'int somefunc()' instead of 'function (int) somefunc()' to indicate an
int return?

It would be a bit more in fitting with traditional languages, and
definitely less typing.. it may require some parser modification,
though..?

(I'd also like to throw my +1 in for scalar type hints, and optional
type coercion for return values - this is something I have run into
annoyances with and blogged about in the past)

Thanks,
Robin Burchell

On Fri, Dec 19, 2008 at 2:23 AM, Kalle Sommer Nielsen <ka...@php.net> wrote:
> 2008/12/18 Nathan Rixham <nrix...@gmail.com>:
>> Nathan Rixham wrote:
>>
>> and strongly typed returns.. nearly forgot
>>
>> public static function parseByte( Number $var ):bool {
>> or
>> public static function bool parseByte( Number $var ) {
>>
>> or such like
>>
>
> Theres already an RFC for this:
> http://wiki.php.net/rfc/typehint
>
>
>
>
> --
> Kalle Sommer Nielsen
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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

Reply via email to