Home  |   Learn  |   Demo  |   Specs  |   Downloads  |   Convert  |   Discuss

Dashrep logo  

Dashrep Language

A text-manipulation
programming language
that saves coding time
and debugging time

What does Dashrep do?

Dashrep translation replaces English-like hyphenated phrases, such as
outline–attention–begin, with any text you define for those phrases.

Special hyphenated phrases allow you to specify complex results—including lists, lists within lists, and branching—in a modular, easy-to-debug, way.

Why bother with yet another language?

It saves time!  For reasons explained below, it saves time during coding, and it saves time during debugging.

Also, Dashrep is much more useful and flexible than templates.

What does the code look like?

Here's a simple example.

animal-name: parrot ----
characteristic-for-parrot: talkative ----
entire-content: The animal-name is
characteristic-for-[-animal-name-] ----

Here is a way to visualize the replacements in this example.

Diagram of replacements

The entire-content phrase expands into:

The parrot is talkative

What's so special about about this simple syntax?

Parameters within square brackets (as shown above) can change the name of a hyphenated phrase—not just its value!  This name switching can invoke an entirely different structure in the results.  If this could be done in executable code, it would be equivalent to allowing a data value to directly choose which function/method to execute.

What can Dashrep code generate?

Here are some possibilities.

The special character in Dashrep—the hyphen (or dash)—is not significant in most programming languages, so it's easy to describe other languages using Dashrep code.

Unlike most languages, Dashrep code can even include sections of Dashrep code, provided that hyphens, spaces, and line breaks are handled using special hyphenated phrases.

Can Dashrep code do calculations?

Dashrep defines these special phrases that provide surprisingly powerful capabilities.

What can Dashrep accomplish?

Here are links to complex web pages that illustrate what Dashrep code can generate:

In these pages the Dashrep code automatically choose the kind of link according to which permissions the user has.  In the first example, the Dashrep code alters the results according to whether each table has zero, one, or more-than-one entry.  The executable code that requests the generation of these pages simply indicates what kind of page to display; the Dashrep code takes care of the details.

How does Dashrep save debugging time?

Bugs in Dashrep code typically produce symptoms that suggest the cause of the bug.  Sometimes this clarity is due to the fact that unrecognized hyphenated phrases are left as-is, so they show up in the results.  For example, if you misspell a hyphenated phrase (and it doesn't match another phrase), the misspelled phrase shows up in the displayed result.

Another time savings occurs because Dashrep code keeps descriptive code separate from executable code.  This separation saves time because interactions between descriptive code and executable code often produce symptoms that don't immediately suggest a likely cause.  Such complicated interactions (between descriptive code and executable code) are time-consuming to debug.  This simplicity contrasts with PHP code, which mixes HTML code with executable statements.  It also contrasts with templates (such as in Ruby on Rails) that contain embedded executable code (often just to fill a non-empty table).

(For perspective, an earlier version of the Dashrep language included “if” statements and loops, and it was difficult to debug.  After realizing that the loops were only used to generate lists, a better way of generating lists was designed.  Later, the addition of the square-bracket syntax provided a much better alternative to using “if” statements.)

A symptom of mixing executable code and descriptive code is the need to often type quotation marks or some other text delimiter.

Also consider that the syntax is so simple—and flexible—that compilation errors are irrelevant.  And remember there is only one data type, namely text.

Finally, Dashrep can save time maintaining code.  Why?  If you choose your Dashrep hyphenated phrases wisely, in a modular way, then adding and revising software functionality can be done with relatively few code changes.

How does Dashrep save coding time?

When writing Dashrep code, you save time by seldom needing to press the Shift key.  The commonly used symbols in Dashrep code—hyphens/dashes and square brackets—are unshifted keys on standard keyboards.  This characteristic is the opposite of many programming languages that require the use of many shifted characters such as these:  {  }  %  =  $

Yet more time is saved by not having to type quotation marks (")—or any other delimiters—that separate executable code from displayed text.  In Dashrep code, an easily typed space separates hyphenated phrases from text that is not translated.  (When space needs to be eliminated, the no-space phrase is used; if typed often, this directive can be assigned to a shorter phrase such as n-s.)

Even more time can be saved by speaking Dashrep code into voice-recognition software.  That's right!  Dashrep code is speakable, provided you use full spoken words in each segment of your phrase.  (Using Dragon Naturally Speaking you can say the words in the phrase and then say “hyphenate that”.)  Speaking the code, or portions of it, also can reduce repetitive-stress-injury (RSI).  As mobile technology develops further, the ability to speak code instead of enter it using keypresses will become an important advantage.

If you use fully-spelled-out phrases, an autocompletion editor can reduce keystrokes (after you have typed a word or phrase once).  As another alternative, a multiple paste buffer (such as provided by Klipper on Linux) can reduce the need to re-enter long phrases.

What's the big picture?

Dashrep code provides a path for text to flow from a data source to the screen, without being handled by executable code.  This is shown below.  Also shown is its ability to handle the text that flows from a user to data storage (after critical portions of the data have been validated by the executable code).

Data flow bypasses executable code

In contrast, the traditional coding approach is to have executable code handle the flow of all text from the data source to the screen.

Traditional approach, all text handled by executable code

Are these time-wasters in your favorite language?

The words “I am wasting time” should come to mind when you encounter any of the following situations as you write and debug code in your favorite languages.

Where do I go from here?

To see examples of Dashrep code and see how it works, go to the Learn page.

If you're anxious to see a demo, go to the Demo page.

If you want to download the open-source code that implements the Dashrep language, go to the Downloads page.

If you want to discuss this language with other users, go to the Discussion page.


For additional projects by Richard Fobes, check out his site at www.SolutionsCreative.com.


Top of Page                © Copyright 2009 by Richard Fobes at www.Dashrep.org.