Re: [PHP-DEV] Renaming type-hints to something else?

[email protected] (Andrea Faulds)
Newsgroups php.internals
Message-ID <[email protected]>
Hi!

Here are my thoughts.

The general concept should be called Optional Type Declarations, to replace “Type Hinting". They are type declarations, and they are optional. Thus the name. For the things themselves, they’re just Type Declarations, to replace “Type Hints". So, for example:

“I am a big fan of optional type declarations. I am always sure to use a type declaration for my functions’ parameters and return type. I would very much like to see type declarations for scalar types added, but realise this is unlikely to happen in the near future.”

For the return type case specifically, it would be a “Return Type Declaration”.

Does that sound reasonable?

Thanks!
--
Andrea Faulds
http://ajf.me/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.