- Design Patterns and Best Practices in Java
- Kamalmeet Singh Adrian Ianculescu LUCIAN PAUL TORJE
- 239字
- 2021-06-25 20:52:27
Declarative programming
Let's go back to the real-life imperative example, where we gave directions to a friend on how to get to a place. When we think in terms of the declarative programming paradigm, instead of telling our friend how to get to the specific location, we can simply give him the address and let him figure out how to get there. In this case, we tell him what to do and we don't really care if he uses a map or a GPS, or if he asks somebody for instructions: Be at the junction between Fifth Avenue and Ninth Avenue at 9:30 in the morning.
As opposed to imperative programming, declarative programming is a programming paradigm that specifies what a program should do, without specifying how to do it. Among the purely declarative languages are database query languages, such as SQL and XPath, and regular expressions.
Declarative programming languages are more abstract compared to imperative ones. They don't mimic the hardware structure, and, as a consequence, they don't change the programs' states but transform them to new states, and are closer to mathematical logic.
In general, the programming styles that are not imperative are considered to fall in the declarative category. This is why there are many types of paradigms that fall under the declarative category. In our quest, we will look at the only one that is relevant to the scope of our journey: functional programming.
- 數據庫程序員面試筆試真題與解析
- WebAssembly實戰
- UI智能化與前端智能化:工程技術、實現方法與編程思想
- Cassandra Data Modeling and Analysis
- FFmpeg入門詳解:音視頻原理及應用
- Android開發:從0到1 (清華開發者書庫)
- JavaCAPS基礎、應用與案例
- C語言從入門到精通
- D3.js By Example
- Python 3.7從入門到精通(視頻教學版)
- ExtJS Web應用程序開發指南第2版
- Data Science Algorithms in a Week
- Microsoft HoloLens By Example
- 計算機應用基礎案例教程(第二版)
- Learning Apache Thrift