Map
Index
Random
Help
th

Quote: a type field leads to two kinds of errors in large programs: failure to test the type field and missed cases in a switch

topics > all references > references sa-sz > QuoteRef: stroB_1991 , p. 188



Group:
type checking
Topic:
dynamic vs. static data type
Topic:
union data type
Topic:
generic operations and polymorphism
Topic:
abstract functions

Quotation Skeleton

[Using a type field] typically leads to two kinds of errors … to place all possible cases in a switch … Both failures … are very hard to avoid when modifying a … [p. 189] Virtual functions overcome the problems with the … redefined in each derived class. … [p. 191] In a typical implementation [of virtual functions], the space … had you chosen to use the … type field solution a comparable amount of space …   Google-1   Google-2

Copyright clearance needed for quotation.

Additional Titles

Quote: virtual functions avoid the need for type tests and case switches. They take nearly the same space as a type field

Related Topics up

Group: type checking   (12 topics, 385 quotes)
Topic: dynamic vs. static data type (19 items)
Topic: union data type (12 items)
Topic: generic operations and polymorphism (65 items)
Topic: abstract functions (11 items)

Copyright © 2002-2008 by C. Bradford Barber. All rights reserved.
Thesa is a trademark of C. Bradford Barber.