Hanki - Language Reference
A complete, concise reference to Hanki. Self-contained: an AI agent (or human) with no prior exposure should be able to read this once and write Hanki programs.
Status: spec-first. Most of what follows describes the target design. The "Implementation status" section near the end tracks what's actually built.
- 1. Elevator pitch
- 2. Lexical structure
- 3. Numeric tower
- 4. Built-in types
- 5. Functions and actions
- 6. Effects
- 7. Errors
- 8. Pattern matching
- 9. Structs and sum types
- 10. Traits and impls
- 11. Generics
- 12. Mutability and visibility
- 13. Closures
- 14. Modules and imports
- 15. Actors
- 16. Meta (compile-time evaluation)
- 17. The standard library at a glance
- 18. Operator and precedence summary
- 19. Worked example - Todo CLI
- 20. Test blocks and
hanki test - 21. Project manifest
- 22. Implementation status
- 22.5 Editor support
- 23. Working in Hanki as an agent - the loop