5 ms·
> What about the warts part? I'm not sure enough time has passed to tell what Rust's warts truly are. I always joke String should have been called StrBuf...
by steveklabnik 10y ago
> What about the warts part?
I'm not sure enough time has passed to tell what Rust's warts truly are. I always joke String should have been called StrBuf...
I do this, yes. This is one of the reasons I hang out in IRC so often; it's an effective way to collect these kinds of things.
More data is always better, and collecting it across multiple venues. I don't think IRC is inherently going to be a representative sample. It's one of the reasons you'll see me pushing for details in Rust threads here, for example.
- kibwen 10y ago> I always joke String should have been called StrBuf Agreed, and Vec should just be Buf! Let's fork the language. :)
- iopq 10y agoAnd it should be white-space sensitive! 1. Writing a tab character introduces the equivalent of {} for blocks, but not other uses of {}. 2. You can still use {} for blocks if need be 3. Everyone uses elastic tabstops in their editor oh yeah, and parens are optional for function application
- cpeterso 10y agoWhy not rename Vec to Buf everywhere with a Vec = Buf type alias for backwards compatibility?
- ainar-g 10y agoI see. I hope to see more better docs soon. Thank you for answering and for generally being open.
- steveklabnik 10y agoYou're welcome, on both counts. I hope we can help you not get stuck if you give it a fourth try :)
- pjungwir 10y agoSo I'm only a Rust amateur (I mean I don't get paid to use it), but I'm on my third round trying to build something with it, and I feel like I'm finally starting to get it. A couple warts I've encountered: - No support for default struct fields: https://github.com/rust-lang/rfcs/issues/1594 https://github.com/rust-lang/rfcs/issues/1594 - Terrible signatures for functions that return iterators: https://www.reddit.com/r/rust/comments/2h26cj/functions_returning_iterators/ https://www.reddit.com/r/rust/comments/2h26cj/functions_retu... If the next push is going to be for ease-of-use, those would be two nice things to fix.
- comex 10y agoA feature designed as a fix for the second problem is already in nightly: https://github.com/rust-lang/rust/issues/34511 https://github.com/rust-lang/rust/issues/34511 Who knows when it'll be stabilized, though.
- steveklabnik 10y ago"sooner rather than later"
- rat87 10y agoI think if you don't mind the overhead you can box the iterator
- cpeterso 10y agoWhy not rename String to StrBuf everywhere with a String = StrBuf type alias for backwards compatibility, if this would clarify new users' understanding of String/str?
- steveklabnik 10y agoIt's not clear that there's a ton of benefit, and not everyone agrees with me that StrBuf is a good name.