Domain-specific languages vs. library of functions

前端 未结 8 1453
予麋鹿
予麋鹿 2021-02-07 08:13

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.

8条回答
  •  悲&欢浪女
    2021-02-07 08:47

    You can use a DSL to decouple a set of related operations from the calling language.

    If you want to shield your users from the complexity of the general-purpose language (or restrict their access to that language because they could abuse it), design a DSL.

    But if you want the operations to be used in a manner integrated with the calling language, then use a library of functions (or other operators).

提交回复
热议问题