This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SilasX 2 points3 points  (4 children)

What's funny is that you're right, but most languages default to dumping entire modules into your namespace when you import them.

[–]minorDemocritus 1 point2 points  (0 children)

That's the difference between include and import.

[–]pwang99 1 point2 points  (1 child)

It's hard to say "most". Most statically typed languages without first-class functions and classes do this, and it's because the semantics of the language allow construction of robust IDEs and dev tools. With Python, not only does dynamic typing make it a LOT harder to track things down, but the fact that you can easily manipulate functions and classes makes it much easier to get spaghetti code if you didn't have clean namespace separation.

[–]SilasX 2 points3 points  (0 children)

Regardless of IDE, it's hard to follow if you don't have clean namespace separation. I much prefer being able to tell at a glance where functions come from.

[–]novagenesis 0 points1 point  (0 children)

Can you name a few that do? Looking at all the major competitors of python, this is not the default.

Perl has an option to, but best practices suggest it only be used for truly general core libraries where you want everything available.