Symbol.species Controls Constructor?!

Symbol.species is POWERFUL! It controls what constructor methods return. Your custom array methods return plain Array, not your subclass! This breaks inheritance!

#javascript #javascripttricks #symbol.species #constructorcontrol #subclassing #javascriptweird #javascriptquiz #codingchallenge #javascriptshorts #javascriptwtf #classinheritance #advancedjavascript

https://www.youtube.com/watch?v=3eq3XAas_pc

Symbol.species Controls Constructor?! #codingchallenge

YouTube

Kick your weekend off with a brand new podcast episode! Available now on your podcatcher of choice…plus new giveaway details this episode 👀

by @bsky.app.profile.talesoftamriel.bsky.social & @uesp

Tales of Tamriel by UESP | An Elder Scrolls Podcast: On U46, Subclassing and Solstice! | Tales of Tamriel

Webseite der Episode: https://talesoftamrielpodcast.com/

Mediendatei: https://traffic.megaphone.fm/ROBR2742195964.mp3?updated=1751046297

#Subclassing #Gaming #News #U46 #ElderScrolls #ElderScrollsOnline #ESO #Solstice #Podcast

Thoughts on #OOP from an old #Python #code poet who’s been talking to machines 40 years, No. 1/397:

1. #Subclassing is rarely helpful. I sometimes construct base classes for unit tests of related #objects. Often, however, these related objects requiring base classes to avoid copy-paste code became necessary b/c I used #subclasses in the first place.

2. It can be helpful when subclasses represent distinct but related flavors of some common behavior.

3. Multiple inheritance: No.