Go! (programming language): Difference between revisions

Content deleted Content added
Codename Lisa (talk | contribs)
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.
<syntaxhighlight lang="go">
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).
</syntaxhighlight>
 
The <code>::=</code> rule defines a new [[algebraic data type]], a [[data type]] with only data constructors.