Technology

Always remember, however, that there’s usually a simpler and better way to do something than the first way that pops into your head.

The Need

World shortage in programmers

Worldwide shortage in professional programmers is projected to grow by 25% every year. The US Labor Department estimates that the global shortage of software engineers may reach 85 million by 2030.  SlashData, a leading analyst company in the developer economy, projects a global 45 million software engineers by 2030. This means that by 2030, for each software engineer position, there would be about 2 positions missing.

Current Tools

No-Code tools

This shortage in programmers and the costs and time involved in current software development methodologies are pushing the industry to invent No-Code tools that enable development by citizens who are technical people with no programming skills. These No-Code tools keep the promise of creating a solution without typing a single line of code, but they are by far less expressive than a full blown General Purpose Programming Language (GPL), lacking any pretention to be Code.

In fact, these No-Code tools are missing the most important property of software being “soft”, resembling hardware more than software, since they use pre-compiled components. In order to retain the “soft” property, they must be expressive like a programming language; that is, be Code. At the same time they must be simple enough for citizen developers; that is, be No-Code.

Could No-Code be Code?

Could it be that the is a language simple enough for citizen developers?

Problem

All current programming languages are complicated

1 in 5 Turing prizes has been awarded for direct contribution to programming languages; thousands of books and scientific papers were written on programming languages; yet, programming languages remain complicated. Furthermore, programming languages are constantly invented (see the table below with Typescript and Rust invented in the last 10 years), but they are not going in the direction of simplification (from the table below it seems that these two languages are among the most complicated ever invented).

Solution

TOO - a new, very simple, programming language

The first attempt to create a simple GPL was put forward by three software engineers that invented Go language: Robert Griesemer, Rob Pike and Ken Thompson. In order to keep the language simple, each could veto new features. This kept Go at about 2 times smaller than other popular languages at that time, such as C++ and Java. Creating a simple GPL is a complicated task, emphasized by Rob Pike in his talk “simplicity is complicated”.

We took this idea to extreme and created TOO – a very simple programming language and a platform. 70 years after the first programming language was invented, TOO enables both citizen developers and professional programmers to create any software solution in minutes, without typing a single line of code.

TOO is influenced by the powerful and compact Go language. It contains all the key features of Go, but it is about 10 times smaller. TOO is formally defined as statically typed, event-driven and object-oriented.

Languages comparison

LanguageKeywordsOperatorsSyntax rulesYearAuthor(s)
Fortran39161701957John Backus
C32271001970Dennis Ritchie
C++90352001979Bjarne Stroustrup
Python3339901991Guido van Rossum
Java51342501995James Gosling
Ruby1328601995Yukihiro Matsumoto
C#78412202000Anders Hejlsberg
Go25341002009Griesemer, Pike, Thompson
Typescript50351502012Microsoft
Rust35452502015Graydon Hoare
TOO14102022Assaf Zeira

What's NOT in TOO

  • No flow-control statements (such as for, while, foreach, etc.).
  • No generic types (such as int, char, int64, etc.).
  • No variable declarations (such as var, let, etc.).
  • No binary operators, e.g., a + b. TOO uses postfix notation instead, e.g., a plus (b).
  • No global objects that could be referenced anywhere.
  • No pointers.

What's in TOO

  • Fully object oriented – Every thing is just a Thing, built from its member Things. Things can be anything: gmail, string, sensor, boolean, number, twitter, sms, spreadsheet… anything…
  • Rule-based – the logic is structured in rules; each has a trigger and actions. This concept greatly simplifies the logic for novice developers (and also for professionals) since it is loop-free.
  • Functional language – functions in TOO may return multiple values, may contain a variable number of arguments (variadic functions), and may be anonymous (lambda functions).
  • Maps replacing arrays – this means that elements are referenced by named subscripts rather than sequential numbers 0,1,… The extra information in the indices enriches the application. For example, the call to voice caller talk(phone[*], “hi “,*, “, hello world!”) would generate a voice call with the following message to all phone elements, “hi Bob, hello world!”, where Bob, Alice, … are the indices of phone.
  • Automatic memory allocation – maps also necessitates operators New and Delete since the elements of a map could be allocated automatically when referenced and deleted by garbage collection.
  • Concurrency based on light-weight threads and channels – adopted from Go language.
  • Interfaces and inheritance – adopted from Go language.

Simplicity and Expressiveness

Simplicity and expressiveness are two contradicting goals. Making a language very simple might render it crippled, limited to a certain domain of problems. On the other hand, making a language very expressive with many statements, syntax rules and operators, might render it too complicated for citizens. In order to achieve both, TOO was gradually simplified while maintaining expressiveness. In this process we adopted the KISS Principle ubiquitously. TOO language, at the core of our technology, is simple, the accompanying tools are simple, and the methodologies are simple. The resulting programs are simple to read, develop, debug and evolve. The following are the main simplifications.

  • TOO, acronym for Things Object Oriented, was simplified to the bare minimum. TOO is the world’s smallest object-oriented programming language, with 1 keyword, 4 operators and 10 syntax rules. In comparison, Go, which is a fairly small language, has 25 keywords, 34 operators and about 100 syntax rules. This enables rapid acquisition of the language and rapid development.
  • Unlike Go, TOO follows rigorous object-oriented principles, with everything made of things without exceptions; from a simple register that holds a boolean variable, to a learning machine that crunches numbers, all are regarded as things. This necessitates generic types and altogether makes it easier for developers to assimilate OOD principles.
  • OOD has its known benefits, but here it also means a strong sharing orientation. Sharing greatly reduces development time as it allows developers to rely as much as possible on a solid ground of debugged things presented in our marketplace. This strong sharing orientation is achieved by a strict decoupling of universal code from sensitive domain specific information (that might be confidential). In this way the things that are offered in the marketplace for sharing are ready to use by other developers like libraries.
  • TOO has a special Initialize function to ensure that the logic remains universal without any debris of domain specific information. In this function, the developer determines the degree of user involvement in initialization. It could be that the developer transfers the responsibility for initialization solely to the user (e.g., let the user initialize Google sheet file id), or it could be that the developer leaves the user an ability to override certain values (e.g., let the user set sensor thresholds), or it could be that the developer completely blocks the user (e.g., the developer sets pi to 3.14…).
  • A TOO program defines a single thing, unlike many other object-oriented languages that allow a program to have multiple objects at the root level. This creates very short programs that are concentrated in a single idea.
  • TOO supports sub-domains that serve the purpose of namespaces. In large projects these sub-domains allow many groups of developers to work together without the need to synchronize naming of things, each working in a separate sub-domain (or a separate sub-sub-domain, etc.). In this way each group may create its own version of thing “customer”, for example.
  • A software program can be viewed as a combination of data structures and algorithms. In conventional coding, developers create the code in monolithic source files that contain these two components intermixed. In TOO’s IDE the data structures and the algorithms are developed separately in order simplify these concepts for citizen developers.
  • A thing in TOO language can only have a single data structure which is a set of things, each that could be a scalar or a map. The language does not allow multiple data structures let alone nested data structures, as well as global data structures.
  • The algorithms in TOO are rule-based, as people tend to think of logic in terms of rules: if something happens, do this and that. A rule is composed of a trigger and a list of actions. Actions are executed one by one in a sequential order and there is no way to go back and re-execute an action that was already executed, and that is why there are no flow-control statements in TOO that would allow the formation of loops. TOO only allows downstream branching at conditional actions.
  • Constraining the logic to such a “loop-free” framework greatly simplifies the algorithms. In the GUI, the logic part of the algorithms is presented by “gravitational’ flowcharts that only flows downwards; if some conditional action is true then branch downstream to the right, otherwise branch downstream to the left.
  • An action box is made of a simple expression that is based on postfix operators, replacing (a + b) * c with a plus b times c, solving precedence of operations and simplifying readability.
  • The platform IDE is built with citizen developers in mind, having (1) a structured editor which implies 0 compile time, (2) a simplified version-control and (3) a simplified debugger.
  • The run-time model is adopting component-based engineering principles which enables running the program while leaving some of its internal parts intact (no need to stop them). This is extremely important for minimizing the system’s down-time.
  • The dashboard widgets saves the need for css/html/javascript coding; a thing or function or rule that is marked for the dashboard contains a predefined viewing option (widget), and the user can adapt its position, size and layer, and can also change the widget if the thing offers several viewing options.
  • TOO could be easily translated to many native languages. This makes it reachable for a larger audience of citizen developers, giving them a smooth entry to the world of software development. Since there are not many keywords in TOO, changing to a different language only requires translating the IDE, and of course translating the catalog of things. The translation of the catalog is scalable since it is done by developers. A developer that places a new thing in the marketplace and wishes to make it available in a different language should take care of the translation of the thing’s name, functions, rules and events, as well as the translation of comments.