Extensibility is a software quality: the system should accommodate new capabilities, types, or variations without requiring a rewrite. It must be balanced with simplicity and maintainability. section 1.2.1
The expression problem exposes two dimensions of extension: adding new data types and adding new behavior. Supporting both simultaneously is difficult in many statically typed designs. section 11.2.2
Design choices shift the difficulty between approaches:
- Object-oriented designs commonly add types through inheritance or duck typing, allowing existing logic to work with new implementations. section 11.2.2
- Strongly typed functional designs without subtype polymorphism require type classes and additional type-level mechanisms to express future admissible inputs. section 11.2.2
- A typed persistence interface can make key–value data available to business logic without unsafe string handling, unnecessary wrappers, or ceremony. section 11.2.2 section 11.0
Typed persistence with extensible records
A key–value database can expose typed operations such as loading Meteor and Comet records, then convert persistence representations into domain values. The interface extends the database model while keeping business code typed. section 11.2.2
loadMeteor :: DBHandle AstroDB -> MeteorID -> LangL KVDBMeteor loadComet :: DBHandle AstroDB -> CometID -> LangL KVDBComet fromKVDBMeteor :: KVDBMeteor -> Meteor fromKVDBComet :: KVDBComet -> Comet
Inspect the paired loading and conversion signatures for Meteor and Comet values. section 11.2.2






