danielhenrymantilla / nougat.rs

(lifetime) GATs on stable Rust
https://docs.rs/nougat
Apache License 2.0
53 stars 6 forks source link

Typo in the docs #6

Closed steffahn closed 2 years ago

steffahn commented 2 years ago

Under “some historical context”

  1. 2021/03/08: I officially mention the workaround for “late/for-quantifying where T : 'lt” clauses thanks implicit bounds on types such as &'lt T.

The date should be 2022/03/08

danielhenrymantilla commented 2 years ago

Ah damn I misread URLO dates 😅. Will fix it when I'm back to the computer. Btw, can you dig up the earliest instances of your own research on hrtb and implicit bounds? I'd like to add it as well; I think it's interesting to see the path made from discovering a language quirk to tricks being known by forum regulars, and up to it becoming knowledge spread across most hrtb-acquainted) rustaceans 😄

steffahn commented 2 years ago

I don’t quite remember the details here, but let me piece things together from what’s recorded in my public postings.

I looked into HRTBs and implied bounds a lot around the time I ran into soundness issues related to those topics… looking through those the time-frame for that is April 2021. I don’t remember how familiar I was with implied bounds prior to that, I certainly had some understanding by April 26th.

Regarding using them in GATs, quinedot had listed some posts of mine on URLO; as far as I remember, I came up with the idea to use a generic parameter for its implied bounds myself; I’m not sure but I might have “re-invented” the idea to use HRTBs to emulate GATs, too, instead of reading about it somewhere else. Hard to remember such things, though. I think my general approach was: lots of interacting with URLO questions for inspiration as to what parts of Rust to play around with; when something seems weird/interesting play around with toy examples until I get an intuitive understanding of it. (I think that’s where e.g. my knowledge about implied bounds came from.)

In any case… going by those posts linked by quinedot, by some time up to June 20th, 2021 I was apparently aware of how to do the whole GAT-emulation thing including the “hack” for the outlives bound; though the far more straightforward/readable (and thus worth linking) post of mine on this is this one from one month later.

Kestrer commented 2 years ago

That would mean that I was actually the first to discover this, because my Discord post happened on 2021-05-14. But I don’t think steffahn uses Discord, so either it must have somehow percolated over time into URLO or steffahn independently discovered the same thing.

danielhenrymantilla commented 2 years ago

It is quite typical to have independent findings of the same thing, since it means the "info was around and fertile enough to give life to this new idea" 😄. I know that I myself saw Kestrer's discord post and it resonated with some experimentation of my own but I had never had the idea to apply it like that, so the moment I saw it I added it to my own mental "trick list". I'm gonna give credit to you two for the findings, then 🙂