Roman Suzi
1 min readOct 19, 2024

--

When viewing the word "declarative" I assumed that the DSL, which will be presented here, will be easily serializable (for example, can be stored in the database or exchanged over the wire in a secure way (=not as a source code one needs to compile).

The simplest way to achieve that is to make a Lisp-like DSL and encode it with JSON syntax.

A la https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule :-)

Or is it just me who thinks declarative programming is quite often about treating programs as data? (that is, Turing-completeness out, less powerful grammars in)

That said, the DDP seems to represent a unique blend for Swift (using types to create behavior-driven models with immutability and message-passing, is a novel combination).

A question: you claim Turing completeness. Have you found a minimal example of a program, which does not halt? I do not mean interactive thing like Game of Life, but some calculation.

I guess, Swift type-checking is not decidable so it can be abused for making DSLs. Nice. Or is it?

(here some inroads for practicalities https://langdev.stackexchange.com/questions/2066/how-to-prevent-undecidable-type-systems )

--

--

Responses (4)