CSE459_CSharp_03_TypeUnificationArrayList

CSE459_CSharp_03_TypeUnificationArrayList - Programming in...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Programming in C# Type Unification - ArrayList CSE 494R (proposed course for 459 Programming in C#) Prof. Roger Crawfis
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Type Unification l Single universal base type (“object”) l Object variable can hold any value l Any piece of data can be stored, transported, and manipulated with no extra work l Unification enables: l Calling virtual functions on any value l Collection classes for any type Let’s look at this feature!
Background image of page 2
Type Unification Desired Picture: How to deal with the primitive types without losing performance? How to create user-defined types that are as efficient as “int” or “double”? Stream MemoryStream FileStream Hashtable double int object
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Unification in SmallTalk l Make everything a real object l Performance implications l All objects have a type descriptor or virtual function table l May require all object to be heap-allocated to prevent dangle pointers l Behavior and expectation mismatch l “int” variables can be “null”
Background image of page 4
Other Unification Approaches l Java and Eiffel
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/27/2012 for the course CSE 459.24 taught by Professor Crawfis during the Winter '11 term at Ohio State.

Page1 / 12

CSE459_CSharp_03_TypeUnificationArrayList - Programming in...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online