Live data from Hacker News

Tell HN: Please stop making more DSLs

news.ycombinator.com

11–17 of 17 posts

Re: Tell HN: Please stop making more DSLs

#12
Since everything turing complete any can any and so on… The main big difference between languages is the context in which your program text is placed. Readily available meanings of your words. Different problems beg for different contexts. Having documented DSL with tooling is so much easier than shoehorning generic language using boilerplate code.

Here is an example of a DSL program, with the output: https://www.contextfreeart.org/gallery/view.php?id=3779 Could you do it in Java? Yes! Could you so effortlesly experiment and arrive at this, simply by experimentin with your code? Hmm.

Re: Tell HN: Please stop making more DSLs

#13
I disagree; I think that for many purposes, DSL will be good. It is not for all purposes, but sometimes it is very helpful for specific uses. However, using and implementing existing programming languages can also be good.

Sometimes, it is helpful to use another programming language and to use the full capabilities of other programming languages. Sometimes, other programming languages are unsuitable for various purposes, including that you do not want the full capabilities, or they do things which are undesirable for this use, etc. It depends on the program that uses them, probably. (Note also that, some programming languages will work better for the purpose of embedded DSL, than other ones will be, although it also depends on the specific use, too.)

However, some programming languages can be usable for multiple uses, e.g. PostScript is both general purpose and special purpose, as well as both text and binary format, and some people have said, also both esoteric and non-esoteric at the same time, too. And, many DSLs can be embedded in other programming languages and can be helpful, but that is not always the case; sometimes it isn't helpful.

Some game programs such as ZZT, MegaZeux, PuzzleScript, MESH:Hero Hearts, and Free Hero Mesh have their own programming languages. I invented Free Hero Mesh, and had designed it for this purpose. I also have idea of a format for Magic: the Gathering cards which can be executed in computer (a special design for this purpose may have many advantages including that AST-based text-changing effects can work).

There can also be data formats. JSON has some disadvantages (including: lack of comments, using Unicode, no optional trailing commas, no 64-bit integers, no directly blobs (they must be encoded), and other problems), so other formats can be helpful to be an improvement for some uses. RDF has some problem so I made up DRDF. And then, other format again, can be useful for different purposes; they will not all need the same things.

Re: Tell HN: Please stop making more DSLs

#16

I think of the awful battles over configuration languages and systems like YAML, TOML, and the Spring Framework. People eventually get the idea this is the road to ruin so they think “let’s write configuration as code” which is the highway to hell.

configuration as code in python is perfectly fine and no issue at all: express the right data structure to map you problem domain well, and you're done.
Post reply on HN