-
Notifications
You must be signed in to change notification settings - Fork 65
Library Design in Wyvern
Jonathan Aldrich edited this page Feb 26, 2019
·
1 revision
General principles
- Encourage functional programming
- Support high-performance code
- Facilitate code that performs well over code that does not
- Encourage type-safe code
- Prefer objects to ADTs
- Prefer composition over inheritance (easy, since Wyvern doesn't yet really support inheritance)
- Group things together that vary together
Naming conventions
- CamelCase, starting Upper for types and lower for values (Java-like)
- Use common names
- Avoid abbreviations
Efficiency considerations
- ensure operations have optimal asymptotic performance
- use tail recursion
- avoid extra allocation
- otherwise, keep implementations as simple and clean as possible