Jason Knight
Mar 31, 2022

--

Once run through a pretty print, that's still ugly as sin, confusing as hell, and painfully inefficient. Especially with 90%+ of the work having to be done in the constructur hardcoded instead of handled by the system.

Though the big question would be how one goes about extending ref_list and/or overloading the constructor whilst still calling the old one. Or overriding methods whilst still calling the old ones.

I mean sure, there's Object.apply, but that gets fugly fast.

Overall your example does a great job showing what a shit-show of incompetence JS objects were prior to the presence of classes.

--

--

Jason Knight
Jason Knight

Written by Jason Knight

Accessibility and Efficiency Consultant, Web Developer, Musician, and just general pain in the arse

Responses (1)