We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
CLEAR
| Paradigm(s) | imperative |
|---|---|
| Designed by | User:Representativeofpeace |
| Appeared in | 2026 |
| Memory system | variable-based |
| Computational class | turing complete |
| Reference implementation | Unimplemented |
CLEAR (an acronym for C-Like Explicit Allocation & Registering Language) is a Functional Esoteric programming language designed to function without textual keywords.
While imperative languages usually rely on keywords like `if`, `else`, and `while`, CLEAR replaces all language keywords with an array of symbols including, but not limited to: ! # () {} ~ \ * + / - = ; : ? | (No square brackets because JS sucks.)
Design Philosophy
CLEAR was created out of a hatred for JavaScript's syntax, keywords, and boilerplate. I removed the keywords and am using a C-style layout with less boilerplate.
Rather than inventing a Brainfuck-like language, I wish for this to be usable by myself and others. Therefore, it is not meant to be unreadable—although it can be if you write it in specific ways, but all languages can do that.
Computational Model
CLEAR operates on a typeless, variable-based memory system with explicit data streaming & piping. It is computed line-by-line, inspired by C. It is like—and unlike—C in a lot of ways. For example, it is an imperative procedural language ("got that from Google"). It uses nearly identical escape sequences, math operations, and more.
Memory System
Data is stored inside named registers, also known as variables. Variables are always encapsulated in quotes: `"here"`. In CLEAR, variables are special as they are typeless (i.e., no `int`, `float`, `char`, `double`, etc.), although a variable can act as all of them. How? It's called being smart: for example, an integer is a regular number, while a float has decimals after it. Well, that's easy: make an integer have a decimal point—`1.1` is a number, and the same goes for `1.055`.
Controlling the Language via Symbols
Control in CLEAR is handled by using specified symbols & conditionals. Since execution proceeds line-by-line, you have to think about where you place your code and how the specified symbols (`/>`, `-`, `true`, `false`, `{}`) work.
Memory Buckets
A memory bucket is basically a struct or a table: it holds a list of variables ("non-global") that exist only inside the bucket. So, a variable outside the bucket and a variable inside it will not collide if they share the same name.
Computational Expressiveness
CLEAR is meant to be Turing-complete. With its combination of variable storage, conditionals, user input scanning, and looping mechanics, it can do anything a Turing-complete language can do (imperatively, anyway; I don't know about declarative differences).
Core Logic
Comments
Comments are formatted exactly like C:
// This is a single-line comment
/*============================= This is a multi-line comment. ==============================*/
Printing & Hello, World
~('hello world')*
The `~()` construct is a print statement: any text placed anywhere in the code is enclosed in `' '`.
Variable Creation
$"name" = 'jack'*
The `$` symbol is a declaration statement. I declared the variable `"name"` with a value of `'jack'`. Text is enclosed in `' '`, whereas numbers or math expressions are enclosed in `()`.
Variable Calls
For your knowledge, all variables are called upon in quotes. For example:
~("name")*
would print `jack`. But:
~('name')*
would print `name`.
Math with Variables
All math operations are enclosed in parentheses `()`. So:
~((5*4))*
would print the result of 5 times 4. Also, math can be performed with variables, like so:
$"x" = (5)*
~(("x" * 4))*
would output `20`.
(5 * 4) /> "x"*
counts too.
Linking & Piping Syntax
The linking syntax is:
-
while the piping syntax is:
/>
Linking syntax is used to link 2 objects together, such as linking variables to buckets, or variables to functions. Linked objects either work like a list ("buckets") or a pointer ("functions").
You can link variables together in specific strings or code blocks so they experience the same change, such as:
$"i" = 'hello'*
$"e" = 'world'*
~("i"-"e")*
Scanning Inputs
Use `~~()` to scan inputs.
So:
~~()-"var name"*
~~()/>"var name"*
~~("var name")*
all work.
Back to the last example:
$"k" = ()*
$"j" = ()*
~~("k"-"j")*
That will assign the value of user input to both of the numbers. while
~~("k","j")*
will assign 2 separate inputs in order.
Note
Also btw:
~(("k"+"j"))*
will print `helloworld`.
Buckets & Buckets with Variables
Buckets are declared by using:
# -#anything inside is a bucket name#*
Because of the way I designed it, variable names and bucket names can contain whitespace.
Assigning Variables to Buckets
You assign a variable to a bucket using the linking syntax:
#-#test bucket#* $"hello" = 'hello' -#test bucket#*
// To call upon a variable inside a bucket, use:
~("hello"-#test bucket#)*
Functions
To declare a function, use the `;` symbol like this:
;function name;-("linked variables", "multiple variables are separated by commas", #buckets too#) {
// Code blocks are grouped with curly braces.
}*
Using Functions
To call a function, do it like this:
;function name;('any input or number in parenthesis'(9))*
Conditionals
Conditionals are rather special: since there are 0 keywords, boolean words do exist.
An example of one would be:
$"i" = (4)*
"i" == (4) \ true { // Do whatever is in the code block
("i"-1)*}*
Both `true` and `false` exist.
How about an `else` statement? Well, use the piping syntax `/>`. Basically, it says: "Hey, this isn't true, so let's do whatever's next" (in the code block).
So:
$"i" = (4)*
"i" == (4) \ true { // Do whatever is in the code block
("i"-1)*}/>{~('i is not equal to 4')*}*
An `else if` statement is the same thing, but with the logic placed before the code block: `/>logic here{}`.
Note on Escape Sequences
The AND/OR operators are the same as C's: `&&` and `||`.
The same applies to escape sequences such as `\n` and `\t`.
Also, all mathematical symbols work as expected: `+`, `-`, `/`, `*`.
== Equal to
>= Greater than or equal to
<= Less than or equal to
Non-C-Like Math
`number^number` — To the power of
'#=' Not equal to
`#` — NOT operator
`%` — Remainder operator (used like this: `/ 2 % 1` // "Is divisible by 2 with a remainder of 1")
Void
to make a thing void simply put a #! before the code block {} so for example a void function would look like
;function name; -("linked items") #!/*note void here*/{
~('your function works')*
}*
void means it cannot be changed it can only emit a value
Loops
Loops are accomplished with the `<` symbol, with the code written first: `code first<"number or variable or condition"`.
So:
{
$"count" = (0)*
~("count")*
("count"+1)*
}<10*
This prints all numbers from 0 to 10.
Or:
~('hello\n')<10*
repeats `hello` 10 times.
Or:
{$"i" = (10)*
~('hello')*
("i" - 1)*
}<("i">=(1))\true*
repeats `hello` 9 times. Since it is checking if `"i"` is greater than or equal to 1, the condition is in parentheses because it is a mathematical comparison (though this is not always required).
Arrays & Difference Between Buckets
Arrays: oh, how I hate them! But C has them, and so does everyone else in a sense. While you may think buckets are arrays, they are not; they are groups of variables, similar to a struct. So let's get into how arrays work.
First, arrays are declared like variables, but they are a little special:
$"array 1"|5|*
or:
$"array 1"-|0,1,2,3,4|*
Calling an array element like:
~("array 1"-|1|)
would print `1`, as the element at index 1 in that array is `1`.
To modify the array, do something like this:
"array 1"-|1| = (4)*
~("array 1"-|1|)*
will now print `4`.
You can make 2-dimensional arrays like this:
$"array2"|2,2|*
Now you have a 2-dimensional array, like a grid.
Number Guessing Game & RNG
The pseudo-random number generator (RNG) symbol is `!`.
So:
~((!100))*
would print any number from 0 to 100.
Note: `!` is also an undefined/infinite operator, so `<!` will loop infinitely. If you put a condition after it, it will repeat infinitely until that condition is met.
Game time:
$"guess" = ()*
~~( ~('guess a number 0 to 100\n') "guess" )* /* Yes, you can put print
statements inside scan statements. Note: variables inside get the
value. If you have multiple variables, use commas. */
{
$"random number" = (!100)*
("guess" > "random number")\true {
~('higher')* }*
/> ("guess" < "random number")\true {
~('lower')* }*
("guess" == "random number")\true {
~('you guessed it, the number was "random number"')* }*
$answer = ' '*
~('would you like to continue yes|no')
~~("answer")*
"answer" == 'yes'\true{ |2<("answer" == 'no')*}*
/* The |2< means repeat the code block 2 levels up so it targets the main loop
("the block 1 level up is the one you are currently in"). This is useful for
nested code. */
}*
Fopen Fclose & Fread
not a keyword but rather some symbols file open file close and file read to open a file use
?->filename>* // this opens a file in this case - is a pointer it links a open command to a file
to read a file use this format
~~^(>filename>) //"you may then pipe that information to a specified location
to close a file do this
?%>filename>* //it just eliminates the previous pointer to a file
Library Support
yes library's are supported but they have to be written in CLEAR you open a file pipe that file to a bucket via reading it then your done whatever functions are in that file you can use
Upcoming Implementation
working on a compiler using c/qbe.
I will eventually try to self host it
doing a simple transpiler to C; test should be usable within 2 days from now Thursday July 30,2026
nevermind got lazy and forgot its gonna be WIP
until i get some sort of support that someone "other than me" will be using it.