-
Notifications
You must be signed in to change notification settings - Fork 0
design_notes
Tuna lang is a project created to provide a problem, that we can then go and solve with a dsl. Many dsl's in fact, as a learning exercise. It is a contrived problem, built as an educational tool.
The problem is this: I want a way to describe what my cats eat and plan their meals.
In the Martin Fowler book 'Domain Specific Languages', he describes the process of creating a DSL as starting with a Semantic Model. This model is defined as a subset of a Domain Model. You can build a DSL to populate the Semantic Model. The Semantic Model is used to drive computational process.
In many examples, the Semantic Model is used to drive a State Machine. Fowler describes a State Machine as 'a particular kind of model whose population effectively acts as the program for the system'.
A State Machine is classified as a Computational Model, a subtype of Adaptive Model. You can contrast an Adaptive Model to the probably more familiar Imperative Model used in most modern programming languages. In an Imperative Model, code is organized, typically, in an object oriented way. This is a very powerful paradigm, but there are some particular problems where a different computational model fits the problem better.