Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
leegraham
on Feb 7, 2022
|
parent
|
context
|
favorite
| on:
PHP – The Right Way
That example would become `use Stuff\Mail as Mail1` and `use Tools\Mail as Mail2` in PHP. What's the difference?
TekMol
on Feb 7, 2022
[–]
The difference is that in PHP, the developers of "Stuff\Mail" and "Tools\Mail" would have to define "Stuff" and "Tools" as the namespace for their code.
In Python, they don't have to do anything. The project that
uses
the code decides.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: