"We know that the world is about to be consumed by a giant overwhelming alien organization, so does anything we do matter?"
NOTE: There has been some debate in the past as to what term best describes when a trait can be turned into a trait object with the syntax dyn MyTrait. The current official term is "object safety", but it is widely agreed to be unsatisfying. We use "dyn-safety" in this document.
-
Progressively move the language towards having by-default dyn-safety for all traits.
-
To that end, add a new
?dyntrait qualifier to indicate that template parameters accept a trait object.
I poured myself a cup of tea, floated down my books from upstairs, and sat down across from him.
There was no burst of energy or determination in my veins. I felt as frightened and unfocused and tired as I did an hour ago. And I wanted more than anything to get drunk, or play Jao Lu, or listen to the radio or watch something on one of those fancy new television sets.
I sat down at the coffee table, next to Hira. And I flipped open the book.
| pub trait VirtualDom { | |
| fn update_value(&mut self, other: Self); | |
| #[track_caller] | |
| fn init_tree(&self, cx: &mut Cx); | |
| fn apply_diff(&self, other: &Self, cx: &mut Cx) -> bool; | |
| } | |
Check out OCaml modular implicits
https://www.fpcomplete.com/blog/2017/06/readert-design-pattern/
Modern life is very structured around imperial utilities
Lots of household chores (cooking, cleaning, deliveries) are handled by state-owned corporations.
Status is displayed by having top-tier service from these corporations. Having personal servants is perceived as un-imperial, barbarian, associated with slavery. High-status people don't have personal housekeepers/cooks/etc, they have contracts with high-reputation housekeeping/cooking/cleaning corporations. Since these corporations are state-owned, getting priority service from them involves personal favors and horse-trading.
Users should be able hit a "record" button, do a bunch of things, then be given a "Summary of what you just did" that goes:
- There were X mousemove events
- There were X mouseenter events
- There were X mouseexit events
- There were X click events
- There were X keyboard events
This is an analysis of how variadic generics could be added to Rust. It's not a proposal so much as a summary of existing work, and a toolbox for creating an eventual proposal.
Variadic generics (aka variadic templates, or variadic tuples), are an often-requested feature that would enable traits, functions and data structures to be generic over a variable number of types.
To give a quick example, a Rust function with variadic generics might look like this: