4 ms·
Its not just inconsistent with other languages, its consistent with their own language. Property types are declared before the property name, while function re
by Rican7 13y ago
Its not just inconsistent with other languages, its consistent with their own language.
Property types are declared before the property name, while function return types are declared after (and with a colon).
Very strange.
- fzltrp 13y agoIf you look at the original C syntax for function types, it is also a bit weird: part of the type (the return type) is placed before, and part (the parameters) after. That syntax in hack seems more "functional" to me. That said, I must admit that I kind of like the C syntax, because of its oddity.
- fauigerzigerk 13y agoBut inconsistency is consistent with PHP's philosophy ;-)