rss
@rohhy

Go! a new programming language from google


Go! is a concurrent programming language, first publicly documented by Keith Clark and Francis McCabe in 2003 and included as part of the Network Agents project at Sourceforge. It is oriented to the needs of programming secure, production quality, agent based applications. It is multithreaded, 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.


Its nature as a multi-paradigm programming language, integrating logic, functional, object-oriented, and imperative programming styles, is particularly applied to ontology-based modeling, as exploited for the Semantic Web in allowing a type system where OWL classes can be represented in the type system. The design of Go!, according to Bordini et al.'s 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, and their style of expression has influenced the modeling of agent systems in Erlang.

Where did the idea for Go come from?

Pike, Thompson and Robert Griesemer of Java HotSpot virtual machine and V8 JavaScript engine fame, decided to make a go of developing a new language out of frustration with the pace of building software. Said Pike:

"In Google we have very large software systems and we spent so long literally waiting for compilations, even though we have distributed compilation and parallelism in all of these tools to help, it can take a very long time to build a program. Even incremental builds can be slow. And we looked at this and realized many of the reasons for that are just fundamental in working in languages like C and C++, and we needed a different approach. We also decided the tools that everybody used were also slow. So we wanted to start from scratch to write the kind of programs we need to write here at Google in a way that the tools could be really efficient and the build cycles could be very short."

Example
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).

- Rohy :)
Follow me @rohhy 

0 comments:

Post a Comment