TWiR quote of the week

I think this quote from the "revisiting modules" post exemplifies something that I think is missing from, or at least not nearly common enough in, the C++ community:

As Quote of the Week material, I guess it's a bit long and context-dependent. Here's a slightly edited version:


Or the extended version: "Every problem with lifetimes can be solved by adding more lifetimes, except too many lifetimes".


why<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h> would<'cntx, 'layout, 'script, 'ptr, 'context> that<'cntx, 'arena, 'static, 'sittac> be<'x, 'y, 'a, 'b, 'c, 'cntx', 'ctnx, 'i> 'a problem<'d>?

< Ralith> don't drink and unsafe D:


From /r/rust:

Nah, it's not you, it's the borrow checker.

Honey, it's not you, it's &mut me.

You can borrow me, and you can change me, but you can't own me.


"Honey, it's not you, it's &mut me"

1 Like

Sometimes I leave ; out on purpose just to see the pretty compiler errors.


once you can walk barefoot (C), it's easy to learn to walk with shoes (go) but it will take time to learn to ride a bike (rust)

/u/freakhill on Reddit


Nominating my own crimes against rhymes:

You better watch out
You better not cry
Better not pout
I'm telling you why
Rust is coming to town

He's making a Vec<_>
He's sharing it twice
Can't modify it while the shares are alive
The borrow checker is nice

It knows when you own
It knows when you share
It knows if you're mut
So don't use unsafe for goodness sake!

O! You better watch out!
You better not race
Better not overflow
I'm telling you why
Rust is coming to town
Rust is coming to town

Tweet inspired by chat at work.


There should be a huge red warning on Rust's package, saying it is addictive. How am I supposed to use any other language now? :innocent:

@vorner on Gitter: rust-lang/rust - Gitter


#rust-internals 2014-01-17 20:13:31

<@brson> i just rejected a rust-dev post from somebody complaining about the performance of the rust game
<@acrichto> brson: haha
<@acrichto> at some point those posts will start to decline


This tickled me, from @frankmcsherry 's Abomination docs:

Abomonation has no safe methods. [...] If you are concerned about safety, it may be best to avoid Abomonation all together. It does several things that may be undefined behavior, depending on how undefined behavior is defined.


These "entomb", "embalm" and "exhume" method names are gold too :slight_smile:

Whoa. How is Abomonation better than just trying to reuse core dump data?

1 Like

No, I was just wondering, because sometimes boxing values can get a bit tiresome.

Hopefully you’re not boxing all that much in Rust :slight_smile:.

1 Like

From u/Quxxy on r/rust about rules of thumbs for use:

Do I use a specific name many times? use that name.

Do I use many things from a module, but only use them infrequently? use the module.

Do I use something only very rarely? I don't use it, I write the full path out, or I use only within the functions it's actually needed.

I don't wildcard unless I'm being sloppy and writing something I don't care about.

Whether I export a module structure or just flat symbols depends entirely on expected uses. Does the module structure matter to the user? No? pub use to create a flatter API. Does the module structure help with having lots of names? Keep it.


Another one from Aturon about ergonomics initiative RFCs:


you can ask a Future "are we there yet", to which it can answer "yes", "no", or "don't make me come back there"
an Iterator is something you can keep asking "more?" until it gets fed up and stops listening
Display is just a way to say "show me your moves", with the other formatting traits being other dance moves
if something isn't Send, then it's a cursed item you can't give away, it's yours to deal with
if something isn't Sync, then it won't even appear for other people, it's possibly an apparition inside your head
things that are Clone can reproduce asexually, but only on command. things that are Copy won't bother waiting for you

-- @QuietMisdreavus on Twitter


<•mbrubeck> in the US and Canada we have a three-day weekend for watching rustconf videos


When programmers are saying that there are a lot of bicycles in code that means that it contains reimplementations of freely available libraries instead of using them

Presumably the metric for this would be bicyclomatic complexity?

— tomwhoiscontrary