this & Object Prototypes by Kyle Simpson
Author:Kyle Simpson
Language: eng
Format: epub, mobi, pdf
ISBN: 9781491904152
Publisher: O’Reilly Media, Inc.
Published: 2014-10-26T16:00:00+00:00
Note
If the function name identifier for Car.drive() hadn’t overlapped with (aka “shadowed”; see Chapter 5) Vehicle.drive(), we wouldn’t have been exercising method polymorphism. So, a reference to Vehicle.drive() would have been copied over by the mixin(..) call, and we could have accessed directly with this.drive(). The chosen identifier overlap shadowing is why we have to use the more complex explicit pseudopolymorphism approach.
In class-oriented languages, which have relative polymorphism, the linkage between Car and Vehicle is established once, at the top of the class definition, which makes for only one place to maintain such relationships.
But because of JavaScript’s peculiarities, explicit pseudopolymorphism (because of shadowing!) creates brittle manual/explicit linkage in every single function where you need such a (pseudo)polymorphic reference. This can significantly increase the maintenance cost. Moreover, while explicit pseudopolymorphism can emulate the behavior of multiple inheritance, it only increases the complexity and brittleness.
The result of such approaches is usually more complex, harder-to-read, and harder-to-maintain code. Explicit pseudopolymorphism should be avoided wherever possible, because the cost outweighs the benefit in most respects.
Download
this & Object Prototypes by Kyle Simpson.mobi
this & Object Prototypes by Kyle Simpson.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(12569)
Hello! Python by Anthony Briggs(9914)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9796)
The Mikado Method by Ola Ellnestam Daniel Brolund(9777)
Dependency Injection in .NET by Mark Seemann(9337)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8296)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7763)
Grails in Action by Glen Smith Peter Ledbrook(7696)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7066)
Microservices with Go by Alexander Shuiskov(6828)
Practical Design Patterns for Java Developers by Miroslav Wengner(6746)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6690)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6413)
Angular Projects - Third Edition by Aristeidis Bampakos(6094)
The Art of Crafting User Stories by The Art of Crafting User Stories(5619)
NetSuite for Consultants - Second Edition by Peter Ries(5558)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5363)
Kotlin in Action by Dmitry Jemerov(5062)
