CPSC 320: Week 15
- Assignment 5
- Variant Records
- A record type can have a descriminant whose value specifies what
rest of the record looks like.
- Used for related types that have variations
- Concept similar to inheritance
- Compiler and runtime checks verify that values are used
consistently
- variant.adb.html
- variant.adb
- C Union - similar but no checking
- Functionality Oriented Programming
- Functionality Oriented Programming (
Notes
by
Franco Gasperoni)
- In contrast to Object Oriented Programming (
Notes )
- Which change is more likely: change in functionality or data?