Can we all appreciate the meta-joke about Lasagna? "Lasagna code is a term of art which means code that is so poorly separated in its layers that you can't change anything without changing everything" ...but he couldn't remove it because he had integrated that metaphor so deeply in his talk that he couldn't remove it. That's hilarious.
Regarding the use of PhantomData, you almost always should use associated types instead. Move the generic types on the traits to associated types and you won't need PhantomData.
@@DrEwert I know this is a year old comment, but regardless, kudos to you for providing a link to a code example to further add value to your comment, this is really helpful. +1
pub(crate) makes sure you can use it inside the lib, but if it becomes a public crate, other users won't be able to poke at what is meant to be an internal structure. You get the benefit of being able to use it yourself from different modules, while keeping your internals private. Furthermore, he used a good chunk of it within private modules, so the scope is actually limited to the mod itself and its sub-modules, instead of the whole crate.
Can we all appreciate the meta-joke about Lasagna? "Lasagna code is a term of art which means code that is so poorly separated in its layers that you can't change anything without changing everything" ...but he couldn't remove it because he had integrated that metaphor so deeply in his talk that he couldn't remove it. That's hilarious.
It really is hilarious 😂
Regarding the use of PhantomData, you almost always should use associated types instead. Move the generic types on the traits to associated types and you won't need PhantomData.
stackoverflow.com/questions/32786089/is-there-an-elegant-way-to-make-a-generic-tuple-struct-with-an-unused-type-witho?rq=1
@@DrEwert I know this is a year old comment, but regardless, kudos to you for providing a link to a code example to further add value to your comment, this is really helpful. +1
19:52 Insert::Inserted and Insert::AlreadyPresent are returned incorrectly from the function.
Good catch. I'm sure next time he will add tests. As the title goes: "Don't trust anyone" (yourself included).
Is it me or he was VERY hungry while preparing the presentation?
Great talk. ty!
6:05 C# -> internal
Is there any reason to use `pub(crate)` everywhere, rather than `pub`?
pub(crate) makes sure you can use it inside the lib, but if it becomes a public crate, other users won't be able to poke at what is meant to be an internal structure. You get the benefit of being able to use it yourself from different modules, while keeping your internals private. Furthermore, he used a good chunk of it within private modules, so the scope is actually limited to the mod itself and its sub-modules, instead of the whole crate.
Here's the source code on speaker's repo github.com/quodlibetor/lasagna-demo