Carol (Nichols || Goulding)

Results 136 comments of Carol (Nichols || Goulding)

Ok so we have SVGs now, the next step is figuring out how to get them into the HTML in such a way as to style them with CSS and...

> For instance, suppose the lifetime `'a` only lasts until immediately after program start. Can you construct an example that illustrates this?

No, can you give me an example of a `main` function where the lifetime of the value only lasts until program start? That is, I don't understand what you mean...

> `'a` could also have a lifetime that ends immediately before the function is called. That would **also** be logically consistent with the explanation, and is also nonsense in terms...

> That's because the book hasn't given any formal semantics to the meaning of the lifetime parameters; up until this point it has just given rules determining how the length...

Let's try a different direction, just with generic type parameters for a moment. Given this example: ``` fn something(input: T) -> T { // ... } ``` This says the...

> but the lifetimes of the input arguments are a different thing than `'a` What makes you say this, exactly? The lifetime parameter `'a` is absolutely describing the lifetimes of...

> because AFAIK Rust never emits diagnostics that mention the value of lifetime parameters, only the lifetimes of concrete references. I have an example of diagnostics that mention the value...

> There is a crucial difference here: x and y do not have lifetimes that are the same as 'a, but rather have lifetimes that are at least as long...

> it's basically impossible to construct a function where this isn't true (afaik). At least I can't imagine how it would be possible. In `let x = fn(y)`, how can...