Content deleted Content added
Cybercobra (talk | contribs) m proper ref |
remove random crap |
||
(148 intermediate revisions by 85 users not shown) | |||
Line 1:
{{
{{for|the language released in 2009 by Google|Go (programming language)}}
{{Infobox programming language
| name = Go!
Line 5 ⟶ 6:
| caption =
| paradigm =
[[multi-paradigm programming language|Multi-paradigm]]: [[concurrent programming language|concurrent]], [[logic programming|logic]], [[functional programming|functional]], [[
| 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]]
| license = [[GPLv2]]
| website =
Line 23:
}}
'''Go!''' is
== Design ==
The
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
== Example ==
The following example illustrates the
<syntaxhighlight lang="prolog">
▲The following example illustrates the 'ontology-oriented' type and declarations style of Go!.
age:[] => integer.
sex:[] => Sex.
home:[] => string.
▲Gender::= male | female.
person(Nm, Born, Sx, Hm)..{▼
▲person <˜ {dayOfBirth:[]=>day. age:[]=>integer.
dayOfBirth() => Born.
▲gender:[]=>Gender. name:[]=>string.
age() => yearsBetween(now(), Born).▼
▲home:[]=>string. lives:[string]{}}.
▲person:[string,day,Gender,string]$=person.
name() => Nm.▼
▲person(Nm,Born,Sx,Hm)..{
lives(Pl) :- Pl = home().▼
▲age() => yearsBetween(now(),Born).
yearsBetween:[integer, day] => integer.▼
▲gender()=>Sx.
yearsBetween(...) => ..▼
▲name()=>Nm.
▲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. ▼
▲newPerson(Nm, Born, Sx, Hm) => $person(Nm, Born, Sx, Hm).
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><
*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==
▲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.
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>
== References ==
{{Reflist|
==Further reading==
{{
* {{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=
* {{cite journal |author=R. Bordini
* {{cite journal |author=M. Fisher
*{{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 conference |author=C. Varela
{{Refend}}
== External links ==
* [
* [http://99-bottles-of-beer.net/language-go!-289.html Code sample on 99-bottles-of-beer.net]
[[Category:Programming languages created in the 2000s]]▼
[[Category:Concurrent programming languages]]
[[Category:Free and open source compilers]]
|