Linked by Eugenia Loli on Mon 20th Mar 2006 07:13 UTC
Thread beginning with comment 105952
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
RE: namespace pollution
by modmans2ndcoming on Mon 20th Mar 2006 15:15
in reply to "namespace pollution"
RE[2]: namespace pollution
by project_2501 on Mon 20th Mar 2006 15:25
in reply to "RE: namespace pollution"
Is not a problem if you know how to handle it. You are not required to "from foo import bar" , it's pure lazyness. But if you know you are not using bar in your code, or any other module with name bar, then it's ok to use it that way.
Programmers are smart (generally) people, unlike most users. They know their language and its shortcuts. Why is that bad?
RE[2]: namespace pollution
by project_2501 on Mon 20th Mar 2006 15:31
in reply to "RE: namespace pollution"





Member since:
2006-03-20
python is a beautiful language - with only one major ugly problem - namespace pollution. even the texts and guides expect you to "import from" into the main namespace... ugly and bad practise.
python needs a better way of handling this. top level names should only be the core set of language keywords (for, if, def,..) and anything else should be structured and unambiguous and unable to clobber anything else. if there are function name lookup issues, as described in the article, that is an implementation issue, not a language design issue. you can cache the name lookup if you like....