Diego (programming language)
| Paradigm | Multi-paradigm: concurrent, imperative, object-oriented |
|---|---|
| Designed by | Tavis Pitt |
| Developer | The Diego Authors |
| First appeared | June 14, 2019 |
| Stable release | Humble Hookbill
/ May 23, 2022 |
| Typing discipline | Inferred, static, strong, structural, nominal |
| Filename extensions | .dgo |
| Website | {{ |
| Influenced by | |
| {{#statements:influenced by}} | |
Search Diego (programming language) on Amazon.
Diego is a statically typed, systemized programming language designed by Tavis Pitt.
History
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 fulfill 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 an instruction language and a programming language.
Syntax
Diego's syntax is unique to other programming languages in that it rarely uses whitespace, and flows in longer statement strings than 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
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
Scope is generally described as "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
Hello world
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
External links
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.
- Diego (programming language)
- 2019 software
- Australian inventions
- Concurrent programming languages
- Cross-platform free software
- Cross-platform software
- High-level programming languages
- Procedural programming languages
- Programming languages
- Programming languages created in 2019
- Statically typed programming languages
- Systems programming languages
