What is a domain specific language? Anybody using it? And in what way?

前端 未结 14 1686
天涯浪人
天涯浪人 2020-12-22 17:04

I guess I am looking for some kind of intro and see if anybody have used it. Are there any particular advantages of using it?

Wikipedia:

domai

相关标签:
14条回答
  • 2020-12-22 17:31

    I've just recently heard DSL but find a really helpful example: LUNA (former lunascript).

    It's a custom-made programming language/framework made by Asana team for their own platform.

    As I further find, many companies make their own frameworks and languages in order to create a proper competitive advantage, some examples are:

    • SAP with AbAp
    • PeopleSoft with PeopleCode
    • Apple with Objective-C
    • Facebook has things like FBML and FQL

    Those are domain specific because you'll use them almost exclusively for working on these platforms.

    I hope this answer helps you clarify on the concept.

    0 讨论(0)
  • 2020-12-22 17:31

    An example of a DSL used in Machine Learning is patsy in python: https://patsy.readthedocs.io/en/latest/formulas.html#

    which is based off the formula DSL from R: https://stat.ethz.ch/R-manual/R-devel/library/stats/html/formula.html

    https://cran.r-project.org/web/packages/Formula/vignettes/Formula.pdf

    and Hadley has a nice section of his advanced R book that describes how to build a DSL w/R: http://adv-r.had.co.nz/dsl.html

    Once the deep learning field stabilizes somewhat (or even now) I'd love to see something similar arise inside Apache MXnet project. However, I haven't seen any proposal for that on the proposal page yet though.

    0 讨论(0)
  • 2020-12-22 17:33

    Domain-specific languages express your domain processes and knowledge in a language that directly uses the concepts and logic from your particular field.

    The community is definitely growing but still not in the level of other "mainstream" technologies.

    Most of the time, DSLs are made to improve productivity inside the companies, so they keep it private and don't share their results/insights.

    Here is a conference where the speaker gives some examples of DSL using JetBrains MPS, with the technology of Projectional editing: https://vimeo.com/197381453

    0 讨论(0)
  • 2020-12-22 17:36

    Well! there is lot of things explained above. I will try to explain this in much simpler way as some one like me come will understand.

    As general purpose languages are used for vast purposes the DSL is only made for specific domain. Like HTML or CSS.

    You can say if you wrote instructions to a paper which only some person or your only best friend can understand and no one else could. Then it may be a DSL. But if you wrote instruction in such terms which many people could understand and could follow then this is not DSL.

    I onces created a Switch board for user which could be operated via Serial port of a computer and User want a program for that board which could be executed on that board and Relay switches will be turned on and off accordingly. So I wrote some instructions and told the user to program that board according to these instructions. This is an example of DSL. I did not invented a new Language rather then I just created bunch of Strings that micro controller could read from EEPROM and could parse accordingly and could perform a specific task.

    0 讨论(0)
  • 2020-12-22 17:36

    One simple example for Domain Specific Language(DSL) is HTML which is used for the particular domain called web-based applications.

    0 讨论(0)
  • 2020-12-22 17:40

    I think it's a language suited to solve problems for a specific domain. It could be some rule-processing language or service description language.

    An opposite to a domain specific language (DSL) is a general-purpose language.

    0 讨论(0)
提交回复
热议问题