3 ms·
DSLs are more succinct. The are declarative. They are closer to English. Perhaps if no relational database existed before today, the standard grammar would jus
by intrasight 3y ago
DSLs are more succinct. The are declarative. They are closer to English.
Perhaps if no relational database existed before today, the standard grammar would just be javascript - but I think not.
- jen20 3y agoDSLs need not be declarative. DSLs need not be succinct. DSLs need not be close to English at all. All of these are properties which may or may not apply to a _specific_ DSL, they are not defining features.
- im3w1l 3y agoBut they can be. They can have nice properties that general purpose languages cannot.
- jen20 3y agoWhy not?
- im3w1l 3y agoWell the reasons for each point are a bit different so let's go through them one by one. A declarative language cannot be general purpose by definition. Succinctness. If you know exactly the domain you are talking about it means you can use many shortcuts and abbreviations that would be unclear otherwise. We all know this is true for natural languages, and it is also true for programming. Close to English. In this case the reasons are more about aesthetics. English is not particularly good for general purpose computation as it struggles to express complex ideas with enough precision that it is crystal clear what is meant. A reader must apply some common sense to disambiguate. A general purpose language close to English would either be a Turing tarpit, or it would be a close-to-english language with some general purpose computation things bolted on.
- jen20 3y ago> A declarative language cannot be general purpose by definition. Prolog is both declarative and general purpose. > Succinctness life ← {⊃1 ⍵ ∨.∧ 3 4 = +/ +⌿ ¯1 0 1 ∘.⊖ ¯1 0 1 ⌽¨ ⊂⍵} > Close to English. We disagree that this is even desirable (and why English, rather than Hebrew or Dutch?) - but BASIC is a pretty good example of a general purpose language which is close to English.