The fade-in on the subtitles is quite distracting, I'd prefer them to just cut from one line to the next. Otherwise I like it!
@yarden-zamir19 сағат бұрын
Hate the fade in on the subtitles. Means I can't immediately read it
@bee_irl16 сағат бұрын
not a fan of these brainrot tiktok-style captions
@sebastianmoser9652Күн бұрын
Thank you, very clear and simple explanation. Mixins look very similar to what PHP calls Traits.
@TheCodingGopherКүн бұрын
My pleasure
@patrickdecabooter411Күн бұрын
I always love your content, keep it up!
@TheCodingGopherКүн бұрын
Cheers!
@splytrz18 сағат бұрын
I'm still not convinced that mixin is distinct from inheritance. It's just a pattern that uses (multiple) inheritance.
@splytrz17 сағат бұрын
To clarify, I don't have an issue with the video. Maybe with the title though. I'm coming from Dart, where mixins have special syntax, which has made me confused for a long time because I couldn't see how they're different, and the video title has made me hope I'll finally understand it. But nope! Especially seeing you use inheritance to implement a mixin convinced me more that the Dart team has added them as a hack to enable multiple inheritance.
@splytrz17 сағат бұрын
I think the core of my misunderstanding was that I was thinking about a **different category**. There is no difference between mixins and multiple inheritance **as a language mechanism**, but, **as patterns** they are different. So, while everyone was talking about a design pattern, I was thinking about the language mechanism. (This is reasonable though, because it was prompted by the language design that presented them as a separate mechanism)
@nathaaaaaaКүн бұрын
Mixins are the foundations of modern Minecraft modding, but we just see it as bytecode modification framework.
@thefanboy328511 сағат бұрын
:o
@anon_y_mousseКүн бұрын
I suppose it's kind of like Rust's traits. Maybe you could compare and contrast different languages and how they use the concept.
@TheCodingGopherКүн бұрын
Yes, these are very similar. Though traits in Rust achieve the shared behavior without inheritance. That's a solid idea for a future video
@debbie8062Күн бұрын
missed you Gopher! Sad to see no daily uploads but i hope that means ur enjoying the holidays!! i really enjoy this type of video, can’t wait to see what type of content you’ll make this coming year
@TheCodingGopherКүн бұрын
🚀🚀!
@vvhatКүн бұрын
Its the cpp equivalent of interfaces
@TheCodingGopherКүн бұрын
Similar, but not exactly. Mixins in Python are more like reusable code snippets added via inheritance, while C++ interfaces (i.e. pure virtual classes) define a contract that classes must implement. Mixins add behavior; interfaces enforce structure.
@davidrieger316010 сағат бұрын
Any reason to use this over composition (e.g. make the logger class a field rather than inheriting from it)?
@arijitgogoi5653Күн бұрын
All right let's mixin
@TheCodingGopherКүн бұрын
Let's go mixin
@lepchКүн бұрын
so mixins are just pytest fixtures
@TheCodingGopherКүн бұрын
Not quite. Mixins are a way to add reusable behavior to classes through inheritance in OOP, while pytest fixtures are specifically designed for setting up / tearing down test preconditions in pytest. Fixtures are automatically injected into test functions (which is the core part of the pytest framework), whereas mixins are a more general programming construct used for sharing code across classes. They can overlap in functionality in some cases - but they're fundamentally different.