Live briefing
Everything about Downcasting
Act of casting a reference of a base class to one of its derived classes
In class-based programming, downcasting, or type refinement, is the act of casting a base or parent class reference, to a more restricted derived class reference. This is only allowable if the object is already an instance of the derived class, and so this conversion is inherently fallible. In contrast upcasting, explicitly treating an object as if it's an instance of one of its superclasses, is always possible. Wikipedia →
đź§ Start here: a 6-step reading path
- Read the overview: DowncastingA 5-minute orientation
- Pick up a classic book: Novels (Sign of Four / Study in Scarlet)The most-reprinted book on the subject
- Read the landmark paper: Multiple downcasting techniquesCited 1 times
- Go sideways: Any typeA closely related topic
- Go sideways: Generics in JavaA closely related topic
đź“– Definitions
Verb present participle and gerund of downcast
🗂️ The subject at a glance
🏆 Landmark papers (most cited)
📚 Books worth reading
Novels (Sign of Four / Study in Scarlet)Arthur Conan Doyle · 1902
Downcast eyesMartin Jay · 1993- 📕I. Scripture-light the most sure light ..William Bridge · 1656
With downcast gaysAndrew Hodges · 1974
The God of all comfortDee Brestin · 2009- 📕DowncastCait Reynolds · 2016
- 📕In downcast Germany, 1919-1933Joan Mary Fry · 1944
- 📕Lifting up the DowncastPatrick Sookhdeo · 2021
Ranked by number of editions on Open Library, a rough measure of how lasting a book is.
đź”— Related topics
- Any type In type theory and computer science, type systems include a top, universal, or any type (often represented with the down tack (⊤) symbol), which includes…
- Generics in Java Generics are a facility of generic programming that were added to the Java programming language in 2004 within version J2SE 5.0. They were designed to…
- Comparison of programming languages (object-oriented programming) This comparison of programming languages compares how object-oriented programming languages such as C++, Java, Smalltalk, Object Pascal, Perl, Python,…
- Run-time type information In computer programming, run-time type information or run-time type identification (RTTI) is a feature of some programming languages (such as C++, Object…
- Type conversion In computer science, type conversion, type casting, type coercion, and type juggling are different ways of changing an expression from one data type to…
- Polymorphism (computer science) In programming language theory and type theory, polymorphism allows a value or variable to have more than one type and allows a given operation to be performed…
- Java syntax The syntax of Java is the set of rules defining how a Java program is written and interpreted. The syntax is mostly derived from C and C++. Unlike C++…
- C Sharp syntax This article describes the syntax of the C# programming language. The features described are compatible with .NET Framework and Mono. An identifier is…