Babel is an esolang currently developed by Sinthorion, in which the source code may only contain the lowercase letters, whitespace, commas and periods. It is a general purpose imperative language. Babel is named after the Library of Babel, both in the sense of Borges' original work and the fanmade website based on it.
As there are (almost) no special symbols in Babel, the language is based heavily on contextual keywords. Integer literals are written as the number written out in English. The keywords and the language in general are intended to be as non-technical sounding as possible. Often times there are multiple ways to express something or even optional redundant keywords to allow the programmer to write a program more like English text.
The language has a string type but it is restricted to holding only the same reduced character set of the code itself: Only lowercase letters, whitespace, commas and period. Babel programs are incapable of reading or writing any character outside this character set; depending on the method used, either the read attempt errors or the text is converted to valid text.
Formally the Babel character set contains: - All 26 lowercase letters of the Latin alphabet (U+0061-U+007A). - Whitespace: An implementation must at least allow space (U+0020) and linefeed (U+000A) but may additionally support tab, carriage return, and any other Unicode character considered whitespace. All of these in any quantity and combination are considered syntactically equivalent to a single space. - Comma (U+002C) and period (U+002E).
Any other character is to be either ignored or raised as syntax error.
Babel has variables, which are identified with any word that is not a reserved keyword. Variables are dynamically typed. (Possibly, a combination of multiple non-keyword words can also be a valid name. Yet to be decided in further development.)
Babel has the following primitve data types:
- number (integer; usually signed 64 bit)
- text (a string that may only contain characters of the Babel character set)
- option (boolean, with the value of true/yes or false/no)
As the language is still early in development, any of this might still change in future.
write text hello world.
write line text enter name. name is read line. hello is word hello hello name is concat with space hello and name. write hello name.