2035 came early (opens external site)
View full thread · View on Hacker News
To get push notifications on iPhone or iPad, add Hack and Chat to your Home Screen: tap Share → Add to Home Screen, then open the installed app and enable push in Settings.
View full thread · View on Hacker News
Replies (1)
Replies (1)
Would upper bounds prevent falling apart if you did something very questionable with cyclical Rc's? If so, how so? What kind of code would compiler REJECT that it wouldn't today?
Replies (1)
I don’t understand the second paragraph. “Questionable” is vague, lots of things are questionable. The last sentence I don’t understand.
I’m illustrating a limitation of the compiler and of Rust as it exists today, not some pre-1.0 version, and I’m not comparing it to some complete alternative compiler without that limitation. The sample code above is an illustration of the limitation only.
Replies (1)
Replies (1)
The thread::scope is kind of a workaround that may or may not work for your use case and I trust people are able to figure out that I’m illustrating a limitation, and not asking “how can I get this code to work”.
If lifetimes could be bounded from above, then we could say that references which the closure borrows are bounded above by the scope containing the thread. We can’t do this, so we use thread::scope instead, which introduces a second closure just to work around the limitation.