领域特定语言与函数库 [英] Domain-specific languages vs. library of functions

查看:80
本文介绍了领域特定语言与函数库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是主观的,我不知道:我有这个问题,我相当于该项目使用哪种语言?问题,因为我似乎无法解决。

This may be subjective, I don't know: I have this problem, which I'm kind of equating to the "what language for this project?" question, since I can't seem to solve it.

我一直被迫为一门技术上非常精通的社区写一本书,该书涉及某个领域(比如说物理学的一个非常具体的分支),但不是程序员。这是一本关于它们每天使用的算法子集的书。

I've been commisioned to write a book about a certain domain (let's say a very specific branch of physics) for a very technically savvy community, but who are not programmers. It is a book on this subset of algorithms that they use day in day out.

为此,考虑到我的听众,我一直在尝试定义DSL的想法,而不是让他们学习X语言,并以此来讨论算法。

For this, given my audience, I've been toying with the idea of defining a DSL, instead of making them learn language X, and discuss the algorithms in this light, instead of in a given language or in pseudo-code.

那么问题是:那么,有什么迹象表明您需要的是DSL,而不是DSL的库。要用一种完善的通用语言来调用函数吗?

The question is, then: what are some indications that what you need is a DSL rather than a library of functions to be called from a well-established, general-purpose language?

谢谢。

编辑:到目前为止,建议使用DSL:

EDIT: Suggestions so far in favor of DSL:


  • 避免通用语言的复杂性。

  • 使程序员在他/她的领域中更有生产力。

  • 使语言概念对编程新手来说非常直观。 (现在就想到这一点)

推荐答案


  1. 您的受众群体是
    非程序员。

  2. 您正在
    定位到特定字段。

  3. 他们
    需要工作完成。

我会选择通用语言之外的DSL。

I would choose a DSL over a general purpose language.

这篇关于领域特定语言与函数库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆