Harpoon

SourceForge.net Logo

One syntax to rule them all

Last modified on 2008/03/11


Contact:

Introduction

Harpoon is an universal, programmer-friendly data-oriented language, designed to provide one syntax for all range of documents, configuration files, knowledge representations, object serialization and even for scripts and large-scale programs.

Key features:

Harpoon can be used as:

  • A complementary language in programming - for data files and scripts.
       You will not have to write parsers anymore.

  • A syntax for domain specific languages such as Pov-Ray, VHDL and your.
       Just define your semantics (types may be useful); the syntax can be common.

  • A language for data interchange between services or processes.
       The problem of communication between different systems is solved. Use types as protocols.

  • A self-documenting S-expressions alternative for Lisp-like programming.
       You can get both power from Lisp and notation from C.

The only trade-off you have to accept is that specialized syntaxes (with Lex/Yacc parsers) will always be a bit more domain-adjusted. Harpoon on the other hand gives you ready-to-use, common and homoiconic (data-oriented) syntax which is good enough for most of cases.

Quick samples

// Basic record

Book

(

title = "Programming with Harpoon"

authors = { "Alice" "Bob"}

year = 2007

pages = 21

)

// Syntactic sugar in programming

function main():

{

for ( i:Int := 0; i < 10; i++ ):

{

writeln!( i.ToString() )

}

}

// Syntactic sugar in mathematics

forall ( x _in N ) : x + 1 > x



Please, send me you comments, especially critical ones.