4 ms·
Does anyone else here find the PHP namespace format horrible and unlike the standard dot notation?
by semerda 13y ago
Does anyone else here find the PHP namespace format horrible and unlike the standard dot notation?
- wvenable 13y agoI hated it till I started using it, now I don't mind. Dot was never used in PHP because it's the string concat operator. PHP needs a unique operator for namespaces because the types of symbols (is it a namespace, class, interface, etc) aren't known at compile time (unlike Java, C#, etc).
- coldtea 13y ago>Dot was never used in PHP because it's the string concat operator. So how about them using the -> operator? Most languages that use . for class method access also reuse it for namespacing.