Dtrace 的编程范式是什么?
我使用 Dtrace 一段时间了,随着时间的推移,我开始想知道 Dtrace 中使用的 D 语言的编程范例是什么。
我猜它不是命令式语言,所以这意味着它是某种声明性函数语言,但我不是语言分类学专家,那么 D 语言应该被正式(或半正式)分类为什么呢?
I've been using Dtrace for a while, and as time goes by I've began to wonder what's the programming paradigm of the D language used in Dtrace.
It's not an imperative language, I guess, so that means it's some sort of declarative functional language, but I'm no expert in language taxonomy, so what should the D language officially (or semi-officially) be classified as?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
D 语言似乎是 C 的子集,添加了特定于跟踪的内置函数(变量、函数)。 它在结构上可以与 awk 或 YACC 程序进行比较:它由一个或多个检测点(探针、规则)的列表组成,并且每个探针都与一个操作相关联。
我的2分钱。
The D language seems to be a subset of C with added builtins (variables, functions) specific to tracing. It can be compared to awk or YACC programs in structure: it consist of a list of one or more instrumentation points (probes, rules), and each probe is associated with an action.
My 2 cents.
Dtrace 显然与面向方面的编程相关,因为它以某种方式编织< /em> 它对正在研究的程序进行了调查。
我想说,编织点的规范属于声明式编程世界,而探针本身是命令式编程的(类似 C)。 但不确定这是否回答了您的问题:-)
Dtrace is obviously related to aspect-oriented programming, in that it somehow weaves its probes into the programs under study.
I would say that the specification of the weaving points belongs to the declarative programming world, while the probes themselves are programmed imperatively (C-like). Not sure is this answers your question though :-)