4

SICP section 2.2.4 describes a little "picture language" to build complicated image patters. The language defines a single primitive painter to draw an image within a given frame and functions to transform and combine painters to create a new painter.

I like this example and want to see more examples of such languages (preferably in Scheme). I would perfer languages for system/business domain. Are you aware of any of such little languages ?

Michael
  • 41,026
  • 70
  • 193
  • 341
  • Have you heard of [Logo](http://www.calormen.com/jslogo/)? – Aadit M Shah Apr 24 '14 at 11:39
  • 1
    Logo is a programming language which is used to teach 6 year old kids how to program. It does so using turtle graphics. For example to draw a square you would move forward `x` units, turn right 90 degrees, and so on 4 times. It also teaches children abstraction by teaching them how to teach the turtle new commands (i.e. defining functions). For example you could define a function to make the turtle draw a square and a triangle and then use those functions to make the turtle draw a house. In addition Logo is very similar to Lisp. It was created by Seymour Papert while he was in MIT. That helps? – Aadit M Shah Apr 24 '14 at 11:52
  • Thank you. Yes, it helps. However I would prefer a little language for everyday tasks in system/business domain. (I will update the question) – Michael Apr 24 '14 at 11:56
  • 1
    Abelson says Lisp* is the tool to make the tool to solve your problems. That means you solve every problem you have by doing this. (* They called Scheme Lisp in the video lectures) – Sylwester Apr 24 '14 at 15:53

2 Answers2

2

These "little" languages also known as Domain-specific languages or DSL. It is widely used programming paradigm, but it has its advantages and disadvantages.

For example there is a commercial general game playing system, called Zillions of Games. It uses S-expressions, so its syntax looks very familiar if you know Lisp. In fact any game scripting language is a DSL.

If you are web developer, you often deal with template languages. And you can think about template language as a domain specific language too. Some of them could be extended, like Django template language, via custom template tags.

Some of current general programming languages was initially developed as domain specific languages. For example, Erlang was initially designed by Ericsson for telephony applications.

maxbublis
  • 1,273
  • 10
  • 21
1

Every well designed program of any size will have one or more 'picture languages' in it. To find examples try MIT Scheme or Schemers.org

GoZoner
  • 67,920
  • 20
  • 95
  • 145