- Learn Type:Driven Development
- Yawar Amin Kamon Ayeva
- 141字
- 2021-07-02 14:41:27
Packaging Types and Values Together
ReasonML has fantastic support for the software engineering practice of dividing programs into small, modular components that can be swapped out for each other.
In this chapter, we will cover:
- Modules and how they can be used to package types and values together
- The difference between file modules and syntactic modules
- Module signatures (both file and syntactic)
- Using signatures to achieve information hiding
- Using signatures to achieve type abstraction
- Achieving zero-cost abstraction
Modules are groups of types and values accessible under a single name. This can be incredibly useful when you want to associate some types and operations together to make them easier to find and use together. They are kind of like namespaces in other languages, but more powerful because they can be composed in various ways.
Let's look at how to make some modules.
推薦閱讀
- 零基礎學Python網絡爬蟲案例實戰全流程詳解(高級進階篇)
- C語言程序設計同步訓練與上機指導(第三版)
- Python算法指南:程序員經典算法分析與實現
- Java系統化項目開發教程
- Python算法詳解
- Vue.js 2 Web Development Projects
- QGIS 2 Cookbook
- Python函數式編程(第2版)
- Django Design Patterns and Best Practices
- 零基礎學C++(升級版)
- Python Machine Learning Cookbook
- Functional Python Programming
- 3D Printing Designs:The Sun Puzzle
- Arduino Electronics Blueprints
- Microsoft Windows Identity Foundation Cookbook