Go! (programming language)

This is an old revision of this page, as edited by Ghthor (talk | contribs) at 19:04, 23 June 2010 (It was quoted as "rollering", but I seriously doubt he said it like that. changed to "rolling"). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Go! is an obscure[1] agent-based programming language in the tradition of logic-based programming languages like Prolog.[2] It was introduced in a 2003 paper by Francis McCabe and Keith Clark.[3]

Go!
ParadigmMulti-paradigm: concurrent, logic, functional, object-oriented, imperative
Designed byFrancis McCabe, Keith Clark
First appeared2003
Preview release
9-30-07 / September 30, 2007 (2007-09-30)
Typing disciplinestrong
OSUnix-like
LicenseGPLv2
Influenced by
Prolog, April

Upon the November 2009 release of Google's Go programming language (note lack of exclamation point), McCabe asked Google to change the name of their language and accused the company of "steam-rolling over us".[2][4]

Design

The authors of Go! describe it as "a multi-paradigm programming language that is oriented to the needs of programming secure, production quality, agent based applications. It is multi-threaded, strongly typed and higher order (in the functional programming sense). It has relation, function and action procedure definitions. Threads execute action procedures, calling functions and querying relations as need be. Threads in different agents communicate and coordinate using asynchronous messages. Threads within the same agent can also use shared dynamic relations acting as Linda-style tuple stores."[3]

The authors also propose that the language is suitable for representing ontologies due to its integration of logic, functional, object-oriented and imperative styles of programming.[5]

Example

The following example illustrates the 'ontology-oriented' type and declarations style of Go!.

Gender::= male | female.
person <˜ {dayOfBirth:[]=>day. age:[]=>integer.
gender:[]=>Gender. name:[]=>string.
home:[]=>string. lives:[string]{}}.
person:[string,day,Gender,string]$=person.
person(Nm,Born,Sx,Hm)..{
dayOfBirth()=>Born.
age() => yearsBetween(now(),Born).
gender()=>Sx.
name()=>Nm.
home()=>Hm.
lives(Pl) :- Pl=home().
yearsBetween:[integer,day]=>integer.
yearsBetween(...) => ..
}.
newPerson:[string,day,Gender,string]=>person.
newPerson(Nm,Born,Sx,Hm)=>$person(Nm,Born,Sx,Hm).

The ::= rule defines a new algebraic data type, a data type with only data constructors.

The rule defines an interface type - it indicates what properties are characteristic of a person and also gives type constraints on these properties. It documents that age is a functional property with an integer value, that lives is a unary relation over strings, and that dayOfBirth is a functional property with a value that is an object of type day.

The $= type rule indicates that there is also a theory label, with the functor person, for a theory that defines the characteristic properties of the person type - implements the person interface - in terms of four given parameters of types string, day, Gender, and string.

References

  1. ^ Brownlee, John (2009-11-13). "Google didn't google "Go" before naming their programming language". Geek.com. Retrieved 2010-01-18.
  2. ^ a b Claburn, Thomas (2009-11-11). "Google 'Go' Name Brings Accusations Of 'Evil'". InformationWeek. Retrieved 2009-11-14.
  3. ^ a b Clark, K.L.; McCabe, F.G. (2003). "Go! for multi-threaded deliberative agents". International Conference on Autonomous Agents (AAMAS'03): 964–965. doi:10.1145/860575.860747.
  4. ^ "Issue 9 - go - I have already used the name for *MY* programming language". code.google.com. 2009-11-10. Retrieved 2009-11-14.
  5. ^ Clark, K.L.; McCabe, F.G. (2006). "Ontology oriented programming in go!". Applied Intelligence. 24 (3): 189–204. doi:10.1145/860575.860747.

Further reading