-
Notifications
You must be signed in to change notification settings - Fork 26
When to Use Maybe
drasil-bot edited this page Jun 13, 2024
·
3 revisions
Warning: Wiki should not be edited directly. Edit the files in the ./wiki/ folder instead and make a PR.
Maybe
can be used:
- in the data representation
- in what the data accessors return
So we'd have HasX
classy-lenses and MayHaveX
classy-lenses. We could have instances of MayHaveX
for all sorts of things where we already know there is no X but where asking the question isn't silly. We do need to be careful to not implement MayHaveX
where the question should not be asked.
From the point of view of our usage, lenses are just polymorphic getters. We want to be able to "get X" from some representation without caring how X is embedded in the data we've been handed, as long as we're promised that X is in there somewhere.
- Home
- Getting Started
- Documentation (of Drasil specifics)
- Design
-
Readings
- Drasil Papers and Documents
- Related Work and Inspiration
- Writing Documentation
- Compression as a Means to Learn Structure
- Glossary, Taxonomy, Ontology
- Grounded Theory
- Model Driven Scrapbook
- Model Transformation Languages
- ODE Definitions
- The Code Generator
- Suggested Reading
- Sustainability
- Productivity
- Reuse
- Formal Concept Analysis
- Generative Programming
- Software Documentation
- Units and Quantities
- Misc.
- WIP Projects