Both stateful and stateless versions are different wrappers of the same computational logic for different interfaces.
stateless/core_functions.py
- Stable interface for production usestateful/stateful.py
- Rapid interface for experimentationstateful/better_stateful.py
- Improved stateful version using helpersstateful/helpers.py
- Extracted logic for easy porting
Same computational core, different wrappers:
- Stateful: Rapid prototyping interface with features like
obj + obj2
- Stateless: Stable interface with explicit parameters for production reliability
Flow: StatefulObject
→ helpers.py
→ stateless/core_functions.py
- Start with object - Begin development with stateful objects for rapid prototyping
- Extract generic function outside - Move computational logic to helpers for direct porting to production
- Translation team orchestrates workflow - Use stateless functions for production with stateful as reference