Hi Paul,

Paul Dragoonis wrote:
On Mon, Oct 12, 2015 at 8:23 PM, Andrea Faulds <a...@ajf.me> wrote:

Hi Andrea,

Can you go ahead and make a branch/PR to add these type aliases in? There's
no right or wrong answer to 'int' versus 'integer', so allowing devs to
continue to use either will be welcoming.


I've written a pull request (doesn't have tests yet) that makes the other type names produce helpful error messages:
https://github.com/php/php-src/pull/1572

e.g.

    $ ./sapi/cli/php -r 'function foo(): long {}'

Fatal error: 'long' is not a valid type hint, use 'int' instead in Command line code on line 1

This would completely solve the confusion issue, I think. A crystal clear error message.

As I've said in a different email, I don't like the idea of allowing the aliases because it'd be another set of coding style differences we don't need. This lets us pick one name and stick with it, without causing confusion.

Thanks.

--
Andrea Faulds
http://ajf.me/

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

Reply via email to