SALSA (programming language)

SALSAParadigm| Actor model

|

First appeared| 2001 (2001)
Stable release|

1.1.5 / July 18, 2011; 14 years ago (2011-07-18)

Implementation language| Java
OS| cross-platform
Filename extensions| .salsa
Website| http://wcl.cs.rpi.edu/salsa/

The SALSA programming language (Simple Actor Language System and Architecture) is an actor-oriented programming language that uses concurrency primitives beyond asynchronous message passing, including token-passing, join, and first-class continuations. It also supports distributed computing over the Internet with universal naming, remote communication, and migration linguistic abstractions and associated middleware. For portability, it produces Java code.

## Contents

* 1 Examples
* 1.1 Hello World
* 1.2 Standard Input
* 2 External links

## Examples

### Hello World

module demo;

This behavior simply sends two print(...) messages to the
standardOutput actor.

behavior HelloWorld {

The act(...) message handler is invoked by stand-alone
theaters automatically and is used to bootstrap salsa
programs.

void act( String[] argv ) {

standardOutput<-print( "Hello" ) @

standardOutput<-print( "World!" );

Notice that the above code is different from
standardOutput<-print( "Hello" );
standardOutput<-print( "World!" );
the code above uses a continuation to insure that the
world message is sent after the hello message
completes processing.

### Standard Input

module demo;

This behavior simply prints out a string,
reads a line from the Standard Input,
combines the return value of the Standard Input with other strings,
and then prints out the combined string.

behavior StandardInputTest{

public StandardInputTest() {}

String mergeString(String str1, String str2, String str3) {
return str1+str2+str3;

void act(String[] args) {
standardOutput<-println("What's your name?")@
standardInput<-readLine()@
self<-mergeString("Hi, ",token, ". Nice to meet you!" )@
standardOutput<-println(token);

## External links

* SALSA programming language website

0.00

(0 votes)

|

Retrieved from "https://handwiki.org/wiki/index.php?title=SALSA_(programming_language)&oldid=311268"