Timeline for Why don't languages auto import everything based on namespace?
Current License: CC BY-SA 4.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 19 at 16:28 | comment | added | JacquesB | @glades: Good point. For example the Java convention is to use namespaces based on the domain name system which is a global registry. Arguably Java and C# already works like you describe since you don't need to import anything if you always use the fully qualified names. | |
| Jan 18 at 19:37 | comment | added | glades | That is true, but isn't that something to strive for? I mean if two namespaces are the same that would be very confusing in any case, I don't think a language is worse of if this is disallowed. | |
| Jan 18 at 14:29 | comment | added | JacquesB | @glades: You would still have the problem if two independent modules used the same namespace. You would need some kind of global registry to avoid that. | |
| Jan 18 at 12:45 | comment | added | glades | Yes and no, I meant that you'd always have to fully qualify the functions you use to make it deterministic. | |
| Jan 18 at 12:22 | history | edited | JacquesB | CC BY-SA 4.0 | added 572 characters in body |
| Jan 18 at 11:59 | comment | added | JacquesB | @glades you can't have namespaces, since this would introduce ambiguities when a name is defined in multiple namespaces. | |
| Jan 18 at 11:58 | history | edited | JacquesB | CC BY-SA 4.0 | added 30 characters in body |
| Jan 16 at 14:48 | comment | added | glades | If namespaces are designed to be unique, the that would work I guess. | |
| Jan 15 at 18:29 | history | answered | JacquesB | CC BY-SA 4.0 |