On Wed, Dec 21, 2011 at 12:20:06PM +0100, Marijn Haverbeke wrote:
> > 2. The dot after the nullary tag. In general I want to write a nullary tag 
> > a LOT
> > more often than I want to write a wildcard binder, so I feel like this is 
> > the
> > wrong way for this choice to go, but I'll understand if this is a decided 
> > issue
> > already.
> 
> I agree the dot is problematic, but I'm *very* skeptical about your
> assertion that you're writing more nullary tag patterns than binders.
> At least in the compiler, I think we see at least ten times more
> binders than nullary tags.

Sorry, I meant wildcard bindings at the top level of a match only. I vastly more
often mean:

alt thing {
        some(...) { ... }
        none. { ... }
}

than:

alt thing {
        some(...) { ... }
        none { ... }
}

That said, hmm. Asking for this is making me start to worry that anything we did
change would make the syntax inconsistent, since I use non-top-level match
bindings way more often than nullary tags.

> > 4. I wish a lot more of the standard library was object-oriented. I realize 
> > this
> > is somewhat of a slippery slope, but writing 'vec::len(thing)' is less nice 
> > (to
> > me) than thing.len(). I think that things in the standard library that are
> > object-like (vec, str, ...) should be objects.
> 
> This is part of the reason we're implementing interfaces (type classes).

Yay!

> > 5. I do not like the mk_foo()/obj foo {} idiom; it forces code another 
> > tabstop
> > to the right.
> 
> If interfaces work out, they'll probably replace the current obj system.

Double yay!

-- elly

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to