Content deleted Content added
removed Category:Programming languages created in the 2000s using HotCat Already categorized in Category:Programming languages created in 2003. See WP:DIFFUSE. |
remove <syntaxhighlight lang="go"> because this is not google's go |
||
Line 35:
The following example illustrates the "ontology-oriented" type and declarations style of Go!:<ref name=applied />
Gender '''::=''' male | female.▼
▲ Gender'''::=''' male | female.
person '''<˜''' {dayOfBirth:[]=>day.
Line 45 ⟶ 44:
lives:[string]{}}.
person:[string,day,Gender,string] '''$=''' person.
person(Nm,Born,Sx,Hm)..{
Line 61 ⟶ 60:
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.
|