- 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.
推薦閱讀
- C++案例趣學
- 編程的修煉
- PHP 從入門到項目實踐(超值版)
- Spring Boot+Spring Cloud+Vue+Element項目實戰(zhàn):手把手教你開發(fā)權限管理系統(tǒng)
- Mastering Web Application Development with AngularJS
- Everyday Data Structures
- 單片機原理及應用技術
- QPanda量子計算編程
- Penetration Testing with the Bash shell
- Java Web動態(tài)網站開發(fā)(第2版·微課版)
- Python程序設計:基礎與實踐
- 深入理解Zabbix監(jiān)控系統(tǒng)
- iOS應用逆向工程:分析與實戰(zhàn)
- Mastering Web Application Development with Express
- 軟件系統(tǒng)優(yōu)化