News for hackers. Stuff that matters.
Re:Systems ideas that sound good but almost never work by vbezhenar on Tuesday December 31, 2024 @04:42PM (#42562069)
If you wrote some functions, it's not DSL, it's functions.

If you calling them in a fancy way with overloads and whatnot, it's not DSL, it's fancy functions.

DSL is domain specific language. It includes domain specific syntax, domain specific semantics and domain specific libraries.

Re:Systems ideas that sound good but almost never work by f1shy on Tuesday December 31, 2024 @05:56PM (#42562486)
Absolutely no. It may have specific syntax, but is not needed. Where do you have such definition? In fact the typical example is in Lisps, where you add no syntax.

Is not about fancy functions. And not about new syntax. Is about adding semantic value. If somebody adds a collection of functions that allow the expression of solutions to a problem in the very language of the problem, that is a DSL, if the syntax chosen, for whatever reason, e.g. simplicity, happens to be the same as some underlying language, that takes nothing to the fact that it is a DSL.

If you look at the examples of SICP, they are “just” fancy functions. But they are DSLs

An extract of the wikipedia article:

As embedded domain-specific language (eDSL)[4] also known as an internal domain-specific language, is a DSL that is implemented as a library in a "host" programming language. The embedded domain-specific language leverages the syntax, semantics and runtime environment (sequencing, conditionals, iteration, functions, etc.) and adds domain-specific primitives that allow programmers to use the "host" programming language to create programs that generate code in the "target" programming language.