REBOL - Dialects

Dialects

REBOL dialects, now popular as domain-specific languages (DSLs), are micro-languages optimized for a specific purpose. Dialects can be used to define business rules, graphical user interfaces or sequences of screens during the installation of a program. Users can define their own dialects, reusing any existing REBOL word and giving it a specific meaning in that dialect. Dialects are interpreted by functions processing REBOL blocks (or parsing strings) in a specific way.

An example of REBOL's dialecting abilities can be seen with the word return. In the data exchange dialect return is just a word not having any specific meaning. In the do dialect, return is a global variable referring to a native function passing back a function result value. In the visual interface dialect (VID), return is a keyword causing the layout engine to simulate a carriage return, moving the "rendering pen" down to the beginning of the next line.

A REBOL interpreter with graphical abilities must understand and interpret many dialects. The table below lists the most important ones in order of significance.

Dialect name Interpreted by Purpose
Data exchange dialect load function represents data and metadata; common platform for REBOL dialects
Do dialect do function programming
Parse dialect parse function pattern matching
Function specification dialect make function function definition; functional programming
Object specification dialect make function object definition/inheritance; prototype-based programming
Visual interface dialect (VID)
or
RebGUI
layout function
or
display function
specifies graphical user interface
Draw dialect view function defines graphical elements (lines, polygons, etc.)
Script specification dialect do function script definition
Security policy dialect secure function specifies security policy

Read more about this topic:  REBOL