Namespaces em PHP
WTF ?!?!!?!?
Uma barra ?!? BARRA ?!?
PHP Gets Namespace Separators, With a Twist
jeevesbond writes “PHP finally is finally getting support for namespaces. However, after a couple hours of conversation, the developers picked ‘\’ as the separator, instead of the more popular ‘::’. Fredrik Holmstrm points out some problems with this approach. The criteria for selection were ease of typing and parsing, how hard it was to make a typo, IDE compatibility, and the number of characters.”
Popularity: 80% [?]
Bom, mas pelo menos deram um rationale a explicar porque escolheram esse carácter. Claro que não abona muito a favor da “beleza” do código mas pronto…
Que carácter preferias?
Dos que lá estão, é difícil dizer, mas poderia escolher o “:>” ou até mesmo o “:::”. São falíveis? São. Mas algo do género:
Namespace\tintin
parece
Namespace [tab] intin
Não acho que seja muito abonatório da facilidade de leitura…