Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> (( managing namespaces seems really tricky, a lot of peoople seem > to thing that the problem goes away by adding "." 's to the name

Well, it becomes someone else's problem... which is about as far as a technical solution to this problem can go: the namespace problem is actually a social problem.

> but how do we discover > the initial name www.a.b? - there are two answers - a) we are given the name > (ie we click on a link) - we do not know the name but we search fo it ))

The third way is that you look through the list of everything that "www.a" provides on a hunch there should be something like "b" in it. Usually this list is short enough that you can do this and also recognize that "ph" is a synonym so you can use it.

Sure, renaming-at-import would help with globally unique names being unwieldy to use but we already can do this with module imports in pretty much any languages, even in C (preprocessor macros or, when you ran into by identical symbol names at the ABI level, symbol renaming).

So I think modules is one of those "worse is better" things: when you imagine how different and wonderful the world could be, it kinda obvious that modules are pretty mediocre. But they work, right here and now, and simple things are possible and complex things require hacks on top but still are mostly possible too.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: