Span (programming language)

Span is a programming language targeting the Parrot virtual machine. Its syntax is meant to be very similar to C, but its philosophy is Smalltalk-like, and it uses Smalltalk-style message syntax. Almost all of Span's library visible to the user is written in Span itself. Span is dynamically typed. The hello world program in Span is

class Hello {
  static public main: args {
    Console << "Hello World!\n";
  }
}

Span uses blocks ala Smalltalk for all flow control constructs except definition. For example, for this pseudocode fragment:

if x > y
    print "yes"
else
    print "no"

Span would write

(x > y)
    ifTrue: { Console << "yes" }
    ifFalse: { Console << "no" };

Span is currently in very early stages of development.

External links


This article is issued from Wikipedia - version of the Thursday, February 26, 2009. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.