Jump to content

Go! (programming language)

From Wikipedia, the free encyclopedia
Go!
ParadigmMulti-paradigm:concurrent,logic,functional,imperative(object-based)
Designed byFrancis McCabe,Keith Clark
First appeared2003;21 years ago(2003)
Preview release
9-30-07 / September 30, 2007;16 years ago(2007-09-30)
Typing disciplinestrong
OSUnix-like
LicenseGPLv2
Influenced by
Prolog[1]

Go!is anagent-basedprogramming language in the tradition oflogic-based programminglanguages likeProlog.[1]It was introduced in a 2003 paper by Francis McCabe andKeith Clark.[2]

Design

[edit]

The authors of Go! describe it as "amulti-paradigm programming languagethat is oriented to the needs of programming secure, production quality and agent-based applications. It ismulti-threaded,strongly typed andhigher order(in the functional programming sense). It has relation, function and action procedure definitions. Threads execute action procedures, calling functions and querying relations as needed. Threads in different agents communicate and coordinate using asynchronous messages. Threads within the same agent can also use shared dynamic relations acting asLinda-styletuple stores."[2]

The authors also propose that the language is suitable for representingontologiesdue to its integration oflogic,functionalandimperativestyles of programming.[3]

Example

[edit]

The following example illustrates the "ontology-oriented" type and declarations style of Go!:[3]

Sex::=male|female.

person<~{dayOfBirth:[]=>day.
age:[]=>integer.
sex:[]=>Sex.
name:[]=>string.
home:[]=>string.
lives:[string]{}}.

person:[string,day,Sex,string]$=person.

person(Nm,Born,Sx,Hm)..{
dayOfBirth()=>Born.
age()=>yearsBetween(now(),Born).
sex()=>Sx.
name()=>Nm.
home()=>Hm.
lives(Pl):-Pl=home().
yearsBetween:[integer,day]=>integer.
yearsBetween(...)=>..
}.

newPerson:[string,day,Sex,string]=>person.

newPerson(Nm,Born,Sx,Hm)=>$person(Nm,Born,Sx,Hm).
  • The::=rule defines a newalgebraic data type,adata typewith only data constructors.
  • The<~rule defines an interface type - it indicates what properties are characteristic of apersonand also gives type constraints on these properties. It documents thatageis a functional property with an integer value, thatlivesis a unary relation over strings, and thatdayOfBirthis a functional property with a value that is an object of typeday.
  • The$=type rule indicates that there is also a theory label, with the functorperson,for a theory that defines the characteristic properties of thepersontype - implements thepersoninterface - in terms of four given parameters of typesstring,day,Sex,andstring.

Conflict with Google

[edit]

In November 2009,Googlereleased a similarly namedGo programming language(with noexclamation point). McCabe asked Google to change the name of their language as he was concerned they were "steam-rolling over us".[1][4]The issue received attention among technology news websites, with some of them characterizing Go! as "obscure".[5]The issue thread opened on the subject was closed by a Google developer on 12 October 2010 with the custom status "Unfortunate" and with the following comment: "there are many computing products and services named Go. In the 11 months since our release, there has been minimal confusion of the two languages."[6]

References

[edit]
  1. ^abcClaburn, Thomas (2009-11-11)."Google 'Go' Name Brings Accusations Of 'Evil'".InformationWeek.Archived fromthe originalon 2010-07-22.Retrieved2009-11-14.
  2. ^abClark, K.L.; McCabe, F.G. (2003). "Go! For multi-threaded deliberative agents".Proceedings of the second international joint conference on Autonomous agents and multiagent systems.pp. 964–965.CiteSeerX10.1.1.117.184.doi:10.1145/860575.860747.ISBN978-1581136838.S2CID2047545.
  3. ^abClark, K.L.; McCabe, F.G. (2006). "Ontology oriented programming in go!".Applied Intelligence.24(3): 189–204.CiteSeerX10.1.1.117.184.doi:10.1145/860575.860747.S2CID2047545.
  4. ^"Issue 9 - go - I have already used the name for *MY* programming language".2009-11-10.Retrieved2009-11-14.
  5. ^Brownlee, John (2009-11-13)."Google didn't google" Go "before naming their programming language".Geek.com. Archived fromthe originalon 2012-05-06.Retrieved2010-01-18.
  6. ^"I have already used the name for *MY* programming language · Issue #9 · golang/go".GitHub.Retrieved2019-07-04.

Further reading

[edit]
[edit]