Content deleted Content added
→Design: grammar fix |
remove random crap |
||
(74 intermediate revisions by 43 users not shown) | |||
Line 1:
{{
{{for|the language released in 2009 by Google|Go (programming language)}}
{{Infobox programming language
| name = Go!
Line 6 ⟶ 7:
| paradigm =
[[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 = {{Start date and 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 = {{
| typing = [[strong typing|strong]]
| implementations =
| dialects =
| influenced_by = [[Prolog]]<ref name="infowk"/>
| license = [[GPLv2]]
| website =
Line 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
== Design ==
The authors of Go! describe it as "a [[multi-paradigm programming language]] that is oriented to the needs of programming secure, production quality
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. |
== Example ==
The following example illustrates the "ontology-oriented" type and declarations style of Go!:<ref name=applied />
<syntaxhighlight lang="prolog">
▲ 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 <code>::=</code> rule defines a new [[algebraic data type]], a [[data type]] with only data constructors.▼
The <code><˜</code> rule defines an interface type - it indicates 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>.▼
</syntaxhighlight>
▲*The <code>::=</code> rule defines a new [[algebraic data type]], a [[data type]] with only data constructors.
The <code>$=</code> type rule indicates 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 string, <code>day</code>, <code>Gender</code>, and string.▼
▲*The <code><
▲*The <code>$=</code> type rule indicates 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> , <code>
==Conflict with Google==
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
== References ==
{{Reflist|
==Further reading==
{{Refbegin}}
* {{cite
* {{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–4 |pages=171–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 |author=R. Bordini
* {{cite journal |author=M. Fisher
*{{cite book|last=McCabe|first=Francis G.|title=Lets Go!|url=
* {{cite conference |author=C. Varela
{{Refend}}
== External links ==
* [https://github.com/frankmccabe/go Github page]
* [http://99-bottles-of-beer.net/language-go!-289.html Code sample on 99-bottles-of-beer.net]
[[Category:Programming languages created in 2003]]▼
[[Category:Concurrent programming languages]]
[[Category:Free and open source compilers]]
▲[[Category:Programming languages created in 2003]]
|