Why use
public string $x = '';
instead of
public $x:string = '';
It seems inconsistent to me, probably because I've used AS3/Haxe.
public string $x = '';
instead of
public $x:string = '';
It seems inconsistent to me, probably because I've used AS3/Haxe.
function foobar() : int { .. }
instead of function int foobar() { .. }Property types are declared before the property name, while function return types are declared after (and with a colon).
Very strange.
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.
The incosistency drives me a bit crazy.