Go! (programming language): Difference between revisions

Content deleted Content added
TobeBot (talk | contribs)
remove random crap
 
(227 intermediate revisions by more than 100 users not shown)
Line 1:
{{for|the language created by GoogleShort Inc.description|GoMulti-paradigm (programming language)}}
{{for|the language released in 2009 by Google|Go (programming language)}}
{{Infobox programming language
| name = Go!
| logo =
| caption =
| paradigm = [[concurrent programming language|concurrent]]
[[multi-paradigm programming language|Multi-paradigm]]: [[concurrent programming language|concurrent]], [[logic programming|logic]], [[functional programming|functional]], [[imperative programming|imperative]] ([[object-based language|object-based]])
| year = 2003
| designeryear = [[Francis{{Start McCabe]],date [[Keithand Clark]]age|2003}}
| designer = [[Francis McCabe]], [[Keith Clark (computer scientist)|Keith Clark]]
| developer =
| latest_release_version =
| latest_release_date =
| latest_test_version = 9-30-07
| latest_test_date = {{releaseStart date|mf=yes and age|2007|9|30}}
| typing = [[strong typing|strong]]
| implementations =
| dialects =
| inspired_by influenced_by = [[Prolog]],<ref Aprilname="infowk"/>
| operating_system =
| license = [[GPLv2]]
| website =
Line 22 ⟶ 23:
}}
 
'''Go!''' is an [[Agent-based model|agent-based]] programming language in the tradition of [[Logic programming|logic-based programming]] languages like [[Prolog]].<ref name="infowk">{{cite magazine |last=Claburn |first=Thomas |url=http://www.informationweek.com/news/software/web_services/showArticle.jhtml?articleID=221601351 |title=Google 'Go' Name Brings Accusations Of 'Evil' |magazine=InformationWeek |date=2009-11-11 |access-date=2009-11-14 |archive-date=2010-07-22 |archive-url=https://web.archive.org/web/20100722010320/http://www.informationweek.com/news/software/web_services/showArticle.jhtml?articleID=221601351 |url-status=dead }}</ref> It was introduced in a 2003 paper by Francis McCabe and [[Keith Clark (computer scientist)|Keith Clark]].<ref name="aamas"/>
'''Go!''' is a [[concurrent programming language]], first publicly documented by Keith Clark and Francis McCabe in 2003 <ref>Clark and McCabe, AAMAS'03, 2003</ref>. It 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 memory stores.
 
== ExampleDesign ==
Its nature as a a multi-paradigm programming language, integrating logic, functional, object oriented and imperative programming styles <ref name=informatica-survey>Bordini et al., Informatica, 2006</ref>, is particularly applied to ontology-based modeling, as exploited for the [[Semantic Web]] in allowing a type system where [[Web Ontology Language|OWL]] classes can be represented in the type system <ref>Clark and McCabe, Applied Intelligence, 2006</ref>. The design of Go!, according to Bordini et al.'s survey <ref name=informatica-survey />, also took into consideration critical issues such as security, transparency, and integrity, in regards to the adoption of logic programming technology. Agents in Go! contain both reactive and deliberative aspects, and coordinate using BDI structures <ref>Fisher et al., Computational Intelligence, 2007</ref>.
 
'''The authors of Go!''' isdescribe it as "a [[concurrentmulti-paradigm programming language]], first publicly documented by Keith Clark and Francis McCabe in 2003 <ref>Clark and McCabe, AAMAS'03, 2003</ref>. Itthat is oriented to the needs of programming secure, production quality, agentand agent-based applications. It is [[multi-threaded]], strongly typed and [[higher order function|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 beneeded. Threads in different agents communicate and coordinate using asynchronous messages. Threads within the same agent can also use shared dynamic relations acting as memory[[Linda (coordination language)|Linda]]-style [[tuple space|tuple stores]]."<ref name="aamas">{{cite book |last1=Clark |first1=K.L. |last2=McCabe |first2=F.G. |title=Proceedings of the second international joint conference on Autonomous agents and multiagent systems |chapter=Go! For multi-threaded deliberative agents |year=2003 |pages=964–965 | doi=10.1145/860575.860747 |isbn=978-1581136838 |citeseerx=10.1.1.117.184 |s2cid=2047545 }}</ref>
Since the launch of Google's programming language, [[Go! (programming language)|Go!]] and [[Go (programming language)|Go]] have become the subject of a naming controversy that is still to be resolved <ref>http://www.informationweek.com/news/software/web_services/showArticle.jhtml?articleID=221601351</ref> <ref>http://code.google.com/p/go/issues/detail?id=9</ref>.
 
The authors also propose that the language is suitable for representing [[Ontology (information science)|ontologies]] due to its integration of [[logic programming|logic]], [[functional programming|functional]] and [[imperative programming|imperative]] styles of programming.<ref name="applied">{{cite journal | doi=10.1007/s10489-006-8511-x | title=Ontology oriented programming in go! | date=2006 | last1=Clark | first1=K. L. | last2=McCabe | first2=F. G. | journal=Applied Intelligence | volume=24 | issue=3 | pages=189–204 }}</ref>
== Communication Model ==
 
== Example ==
Threads within a single Go! process, hence in the same agent, can also communicate by manipulating dynamic relation objects, comparable with Linda tuple stores <ref name=informatica-survey />, used to coordinate their activities. A related combination of tuple-based shared stores and Semantics has been taken up as the communication mechanism in the approaches of TripCom <ref>www.tripcom.org/</ref> and [[SOA4All]] <ref>www.soa4all.eu</ref>.
The following example illustrates the '"ontology-oriented'" type and declarations style of Go!.:<ref name=applied />
<syntaxhighlight lang="prolog">
GenderSex ::= male | female.
 
person <˜~ {dayOfBirth:[] => day. age:[]=>integer.
age:[] => integer.
sex:[] => Sex.
gender:[]=>Gender. name:[] => string.
home:[] => string.
home:[]=>string. lives:[string]{}}.
 
person:[string, day,Gender Sex, string] $= person.
== Example ==
 
person(Nm, Born, Sx, Hm)..{
The following example illustrates the 'ontology-oriented' type and declarations style of Go!.
dayOfBirth() => Born.
 
age() => yearsBetween(now(), Born).
<source lang="javascript">
gender sex() => Sx.
Gender::= male | female.
name() => Nm.
person <˜ {dayOfBirth:[]=>day. age:[]=>integer.
home() => Hm.
gender:[]=>Gender. name:[]=>string.
lives(Pl) :- Pl = home().
home:[]=>string. lives:[string]{}}.
yearsBetween:[integer, day] => integer.
person:[string,day,Gender,string]$=person.
yearsBetween(...) => ..
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).
</source>
 
newPerson:[string, day,Gender Sex, string] => person.
The ::= rule defines a new algebraic type - a data type with only data constructors.
 
newPerson(Nm, Born, Sx, Hm) => $person(Nm, Born, Sx, Hm).
The <˜ rule defines an interface type - it tells us 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.
</syntaxhighlight>
*The <code>::=</code> rule defines a new [[algebraic typedata -type]], a [[data type]] with only data constructors.
*The <˜code><~</code> rule defines an interface type - it tells usindicates what properties are characteristic of a <code>person</code> and also gives type constraints on these properties. It documents that <code>age</code> is a functional property with an integer value, that <code>lives</code> is a unary relation over strings, and that <code>dayOfBirth</code> is a functional property with a value that is an object of type <code>day</code>.
*The <code>$=</code> type rule tells usindicates that there is also a theory label, with the functor <code>person</code>, for a theory that defines the characteristic properties of the <code>person</code> type - implements the <code>person</code> interface - in terms of four given parameters of types <code>string</code>, <code>day</code> , Gender<code>Sex</code>, and <code>string</code>.
 
==Conflict with Google==
The $= type rule tells us 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.
In November 2009, [[Google]] released a similarly named [[Go (programming language)|Go programming language]] (with no [[exclamation point]]). McCabe asked Google to change the name of their language as he was concerned they were "steam-rolling over us".<ref name="infowk"/><ref>{{cite web|url=http://code.google.com/p/go/issues/detail?id=9 |title=Issue 9 - go - I have already used the name for *MY* programming language |date=2009-11-10 |access-date=2009-11-14}}</ref> The issue received attention among technology news websites, with some of them characterizing Go! as "obscure".<ref>{{cite news |url=http://www.geek.com/articles/news/google-didnt-google-go-before-naming-their-programming-language-20091113/ |title=Google didn't google "Go" before naming their programming language |last=Brownlee |first=John |date=2009-11-13 |publisher=Geek.com |access-date=2010-01-18 |archive-date=2012-05-06 |archive-url=https://web.archive.org/web/20120506104459/http://www.geek.com/articles/news/google-didnt-google-go-before-naming-their-programming-language-20091113 |url-status=dead }}</ref> 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."<ref>{{Cite web|url=https://github.com/golang/go/issues/9#issuecomment-66047478|title=I have already used the name for *MY* programming language · Issue #9 · golang/go|website=GitHub|language=en|access-date=2019-07-04}}</ref>
 
== Footnotes ==
{{Reflist|2}}
 
== References ==
{{reflistReflist|30em}}
 
==Further reading==
{{refbegin}}
{{Refbegin}}
* {{cite journal |last1=Clark |first1=K.L. |last2=McCabe |first2=F.G. |year=2003 |title= Go! for multi-threaded deliberative agents |journal=International Conference on Autonomous Agents (AAMAS'03) |pages=964 - 965 |url=http://portal.acm.org/citation.cfm?doid=860575.860747 | doi=10.1145/860575.860747 }}
* {{cite paperweb |last1=Clark |first1=K. L. |last2=McCabe |first2=F. G. |year=2003 |title=Ontology Oriented Programming in Go! |url=http://www.doc.ic.ac.uk/~klc/DistKR.pdf }}
* {{cite journal |last1=Clark |first1=K. L. |last2=McCabe |first2=F. G. |year=2004 |title=Go!—A Multi-Paradigm Programming Language for Implementing Multi-Threaded Agents |journal=[[Annals of Mathematics and Artificial Intelligence]] |volume=41 |issue=2-42–4 |pages=171 - 206171–206 |url=http://portal.acm.org/citation.cfm?id=998367 |doi=10.1023/B:AMAI.0000031195.87297.d9 |citeseerx=10.1.1.133.1069 |s2cid=6992205 }}
* {{cite journal |last1author=Clark |first1=K.LR. |last2=McCabe |first2=F.G.Bordini |year=2006 |title=OntologyA orientedSurvey programmingof inProgramming go!Languages and Platforms for Multi-Agent Systems |journal=Applied IntelligenceInformatica |volume=2430 |issuepages=333–44 |pagesurl=189http://www.informatica.si/vol30.htm |display-authors=etal 204 |url-status=dead |archive-url=httphttps://portalweb.acmarchive.org/citationweb/20091115151833/http://www.cfm?id=1127540 |doi=10informatica.1145si/860575vol30.860747htm |archive-date=2009-11-15}}
* {{cite journal |author=M. Fisher et al. |year=2007 |title=Computational Logics and Agents - A Roadmap of Current Technologies and Future Trends |journal=Computational Intelligence |volume=23 |issue=1 |pages=61 - 9161–91 |url=http://www3.interscience.wiley.com/journal/118495224/issue |archive-url=https://archive.today/20130106033209/http://www3.interscience.wiley.com/journal/118495224/issue |url-status=dead |archive-date=2013-01-06 |doi=10.1111/j.1467-8640.2007.00295.x |display-authors=etal |citeseerx=10.1.1.114.6149 |s2cid=3393868}}
* {{cite journal |author=R. Bordini et al. |year=2006 |title=A Survey of Programming Languages and Platforms for Multi-Agent Systems |journal=Informatica |volume=30 |pages=33 - 44 |url=http://www.informatica.si/vol30.htm }}
*{{cite book|last=McCabe|first=Francis G.|title=Lets Go!|url=https://books.google.com/books?isbn=0975444913|date=February 7, 2007|publisher=Network Agent Press|isbn=978-0-9754449-1-7}}
* {{cite journal |author=M. Fisher et al. |year=2007 |title=Computational Logics and Agents - A Roadmap of Current Technologies and Future Trends |journal=Computational Intelligence|volume=23 |issue=1 |pages=61 - 91 |url=http://www3.interscience.wiley.com/journal/118495224/issue }}
* {{cite conference |author=C. Varela |year=2004 |title=On Modelling Agent Systems with Erlang |conference=ACM SIGPLAN Erlang Workshop '04 |url=http://ftp.sunet.se/pub/lang/erlang/workshop/2004/ |display-authors=etal |access-date=2009-11-12 |archive-date=2009-11-15 |archive-url=https://web.archive.org/web/20091115113314/http://ftp.sunet.se/pub/lang/erlang/workshop/2004/ |url-status=dead}}
{{refend}}
{{Refend}}
 
== External links ==
* [httphttps://homepage.macgithub.com/frankmccabe/FileSharing1.htmlgo DownloadGithub page]
* [http://99-bottles-of-beer.net/language-go!-289.html Code sample on 99-bottles-of-beer.net]
* [http://books.google.com/books?isbn=0975444913 Lets Go! textbook by Francis McCabe]
{{compu-lang-stub}}
 
[[Category:Programming languages created in the 2000s]]
[[Category:Concurrent_programming_languages]]
 
[[Category:Concurrent programming languages]]
[[fr:Go! (langage de programmation)]]
[[Category:Free and open source compilers]]
[[ru:Go! (язык программирования)]]
[[Category:Programming languages created in the 2000s2003]]