知识卡片

普通读书笔记卡 · 1971.o.1.b.4.b

建模范式支撑模型直译

理解等级:高级

模型与设计要紧密对应,开发工具须能直接表达模型里的关键构造。对象语言可表达对象、关联和行为;Prolog 适合以事实和规则为核心的逻辑模型。纯过程式代码通常只留下处理数据的步骤,较难保留非数学领域的概念关系。但这不是说某语言完全不能建模:原书以 Fortran 表达数学函数为适配的反例。选择范式要看领域概念能否在代码中清楚出现。参见 [[模型驱动设计兼顾分析与实现]]。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第25章《原书第03章|Modeling Paradigms and Tool Support》(源文件:_epub-src/0321125215_ch03lev1sec2.html;图3.1) - 结论依据:原文要求工具支持与模型概念直接对应的范式,分别比较对象、逻辑与过程式表达,并以 Fortran 的数学函数领域说明过程式语言仍有适配范围。 - 原始内容:To make such a close correspondence of model and design possible, it is almost essential to work within a modeling paradigm supported by software tools that allow you to create direct analogs to the concepts in the model. ... In this case, the paradigm is logic, and the model is a set of logical rules and facts they operate on. ... Mathematical functions are the main conceptual component of such a model and can be cleanly expressed in fortran.