[rust-dev] A couple of tweaks to make typeclasses easier?

Graydon Hoare graydon at mozilla.com
Thu Jan 26 18:10:57 PST 2012

On 1/26/2012 5:41 PM, Patrick Walton wrote:

>> A bit opposed to both, sadly. I quite like picking up impls "by
>> accident" via "import foo::*", and dislike the aesthetic of ->.
> Is "import impl foo::*" bad?

Depends what it means! Does it pull in the same stuff that "import 
foo::*" pulls in, in addition to impls? Or just impls? IWO, do I have to 
double the number of boilerplate lines to get access to foo-and-its-methods?

>> Is the ambiguity between field-access and method-call really biting in
>> actual cases? Users really seem to adore '.' as a sub-component
>> accessor. We even have people wanting us to go back to '.' for
>> module-separator :)
> Yes, I found it very confusing yesterday, when trying to figure out "."
> with a closure. It's also screwing up our error messages.

What was the error message? I'm not trying to be a pain, just concerned 
that a proliferation of -> symbols through much of our code will read 
poorly, and want to try to avoid.


More information about the Rust-dev mailing list