You can edit almost every page by Creating an account. Otherwise, see the FAQ.

Diego (programming language)

From EverybodyWiki Bios & Wiki

Script error: No such module "AfC submission catcheck".

Diego
ParadigmMulti-paradigm: concurrent imperative, object-oriented
Designed byTavis Pitt
DeveloperThe Diego Authors
First appearedJune 14, 2019; 4 years ago (2019-06-14)
Stable release
Humble Hookbill / May 23, 2022; 2 years ago (2022-05-23)
Typing disciplineInferred, static, strong, structural, nominal
Filename extensions.dgo
Website{{#property:P856}}
Influenced by
{{#statements:influenced by}}

Search Diego (programming language) on Amazon.

Diego is a statically typed, systemised programming language designed by Tavis Pitt.

History[edit]

Diego evolved from a need to provide a common shared corpus of instructions to robots from a human-controlled console. In June 2019, Tavis Pitt, working as a roboticist, was given two robots and was asked to "make them talk to each other". In order to fulfil the request, various tasks were chosen to test communication between robots and humans. Initially the communication was provided with ROS2 messages based on C++, however, when switching between tasks another layer was needed to codify the ROS2 messages. Diego was then developed to provide this abstract common language of instructions.

As Diego grew its vocabulary, an abstract programming corpus of commands was added, then Diego became a instruction language and a programming language.

Syntax[edit]

Diego's syntax is unique to other programming languages in that it rarely uses white-space, and flows in longer statement strings that most other languages. The components of a statement are separated with the _ underscore, with semicolons used to terminate statements. There are many syntactical alternatives, and shortened alternatives to commands.

Diego is a very structured instructional language and follows a strict syntax, with a fundamental syntax construction consisting of:

verb_object/action(moniker/value)_posit()...

Statements are nested inside other statements by bordering semicolons. Outcomes of statements are managed using an [elvis-like operator](Elvis_operator) using ? for a positive outcome, | for a neutral outcome or sibling statement(s), and, : for a negative outcome or an error.

Types[edit]

Datatypes in Diego are only implied by name following the general-purpose datatypes proposed in ISO/IEC 11404. The datatype given in Diego code is presumed to be the datatype of the caller. The callee will have to presume the datatype name from the caller is the same datatype of the same name by the callee.

Scope[edit]

Scope is generally described a "public and interpreted" in Diego, as all statements are shared amongst thingys (humans, robots, and mobots). Every statement is 'public access', so scope is only achieved through discernment, swarmation, and discrimination. The keyword me (used as an verb-action, action, or, posit) is used to keep discernment of other thingys for use of the statement(s). The use of objects or criteria is used to discriminate against/for humans/robots/mobots. Then excluding objects (or using other criteria) is used to swarmate humans/robots/mobots.

Examples[edit]

Hello world[edit]

use_namespace(wikipedia)_me();

add_instruct()
    me_msg(hello world);
;

exec_instruct()_me();

reset_namespace[];

where use_namespace(wikipedia)_me(); initiates the `wikipedia` namespace. Namespaces (using _namespace, or, shortened, _ns) contain the scope of statements, objects, variables, etc. however, everything is public inside the namespace. instruct is a method with no return statement, similar to a 'void' function in C++.

References[edit]

External links[edit]

Official website


This article "Diego (programming language)" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Diego (programming language). Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.