I think it helps that Rust allows imports in any block.  You could use glob 
imports like this with little risk of breaking:

```
fn foo() {
        import std::str::*
        [..]
}
```

Eric


On Mar 12, 2014, at 2:17 PM, Bob Ippolito <[email protected]> wrote:

> Glob imports work well up front but aren't good for maintenance. In Haskell 
> if a popular library adds a new function it could easily break any packages 
> that depend on it that use glob imports. It's more work but almost always 
> best to explicitly import individual names. A tool could help with this 
> though. 
> 
> On Wednesday, March 12, 2014, Huon Wilson <[email protected]> wrote:
> Certain aspects of them dramatically complicate the name resolution algorithm 
> (as I understand it), and, anyway, they have various downsides for the actual 
> code, e.g. the equivalent in Python is frowned upon: 
> http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html#importing
> 
> Maybe they aren't so bad in a compiled & statically typed language? I don't 
> know; either way, I personally find code without glob imports easier to read, 
> because I can work out which function is being called very easily, whereas 
> glob imports require more effort.
> 
> 
> Huon
> 
> On 12/03/14 20:44, Liigo Zhuang wrote:
>> "glob use" just make compiler loading more types, but make programmers a lot 
>> easy (to write, to remember). perhaps I'm wrong? thank you!
>> 
>> -- 
>> by Liigo, http://blog.csdn.net/liigo/
>> Google+  https://plus.google.com/105597640837742873343/
>> 
>> 
>> _______________________________________________
>> Rust-dev mailing list
>> [email protected]
>> https://mail.mozilla.org/listinfo/rust-dev
> 
> _______________________________________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/rust-dev

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to