- 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.
推薦閱讀
- Java程序設計與開發
- Software Defined Networking with OpenFlow
- Beginning Java Data Structures and Algorithms
- ASP.NET MVC4框架揭秘
- Azure IoT Development Cookbook
- C#完全自學教程
- Cocos2d-x游戲開發:手把手教你Lua語言的編程方法
- Programming ArcGIS 10.1 with Python Cookbook
- Kotlin Standard Library Cookbook
- C語言實驗指導及習題解析
- Spring Boot企業級項目開發實戰
- Haxe Game Development Essentials
- 深入理解Elasticsearch(原書第3版)
- Visual C#.NET Web應用程序設計
- Android系統下Java編程詳解