描述性声明式内核语言
在这个问题中,我参考了 Van Roys 和 Seif Haridi 的书 - “计算机编程的概念、技术和模型”。
背景信息(根据参考书中我自己的话解释):
声明式程序定义了我们想要实现的目标,无需解释 如何达到某种结果。声明式程序可能是 描述性或可编程
可编程级别描述组件(上下文和行为)
- 我希望其他人向我解释什么是描述性声明性程序以及它定义了什么?
- 我还想标记实践(编程语言)中的描述性和可编程级别之间的关系(差异)
这个问题是在阅读参考了书,关于声明式编程的一章。 (第115页讲述了声明式编程的分类,其中描述性声明性的定义有点不清楚,至少对我来说)
In this question I reference Van Roys and Seif Haridi book - "Concepts, techniques, and models of Computer Programming".
Background information(interpreted by my own words from the referenced book):
Declarative program defines what we want to achieve without explaining
how to achieve a certain result. A declarative program may be
Descriptive or Programmable
The Programmable level describes the component(context and behavior)
- I would like others to explain to me what is the descriptive declarative program and what does it define?
- I would also like to mark the relation(difference) between the descriptive and programmable levels in practice(programming languages)
This question arose while reading the referenced book, a chapter about declarative programming. (Page 115 tells about classifications of declarative programming, where descriptive declarativeness definition is a little unclear, at least for me)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
描述性声明性 Oz 程序是仅使用变量和值的程序。它不使用任何控制结构或递归。例如:
或
什至(创建“无限”记录):
HTML 文档(不使用任何扩展,如嵌入式 Javascript)也将是一个描述性声明性程序。
纯粹的描述性语言不是图灵完备的。
纯描述性程序是可编程声明性程序的真正子集。
可编程声明性程序可以包含递归和许多其他控制元素。该模型在本书的第 2 章中进行了描述。一个重要的属性是“引用透明度”,即无论在什么情况下或多久调用一个函数,给定相同的参数,它总是返回相同的结果。
纯函数式 Haskell 程序也是可编程声明性程序的一个示例。
对于此类问题,我还推荐 Mozart 用户邮件列表,也许还有“Lambda the Ultimate”论坛。在这些地方,您的问题甚至可能会得到书籍作者的解答。
A descriptive declarative Oz program is a program that only uses variables and values. It does not use any control structures or recursion. For example:
or
or even (creating a "infinite" record):
An HTML document (without using any extensions like embedded Javascript) would also be a descriptive declarative program.
A purely descriptive language is not Turing-complete.
Purely descriptive programs are a real subset of programmable declarative programs.
A programmable declarative program can contain recursion and many other control elements. The model is described in chapter 2 of the book. An important property is "referential transparency", i.e. no matter in what situation or how often you call a function, it will always return the same result given the same parameters.
A purely-functional Haskell program would also be an example of a programmable declarative program.
For questions like this I also recommend the Mozart users mailing list and maybe the "Lambda the Ultimate" forum. At these places your questions may even be answered by the book authors.