Unfedern

From Esolang
Jump to navigation Jump to search
Unfedern
Paradigm(s) procedural, declarative, object-oriented
Designed by User:zseri
Appeared in 2018
Type system static
Memory system variable-based
Dimensions one-dimensional
Computational class probably Turing-complete
Reference implementation
Influenced by Entfedern
File extension(s) .ufdn
This article is not detailed enough and needs to be expanded. Please help us by adding some more information.

Unfedern is a derivative of Entfedern.

Extensions

Anonymous Variables

The following example is impossible in Entfedern, but possible in Unfedern.

Cat {
   finalize() {
       int c;
       c = read();
       1 = sign(c + 1);
       printed(c);
       finalized();
   }
}

Syntax:

<literal> = <expression>;

e.g. The left hand of this anonymous 'assert'-alike statement must be a string/integer/float... literal (compile/first-JIT time constant).

This statement is called the 'assert' statement.

Delayed declaration and definition

Variables can be declared anywhere in a function (but only with unique names).

 int x = 1; 
 printed(x);
 int y = x;

Examples

cat

Cat {
   finalize() {
       int c = read();
       1 = sign(c + 1);
       printed(c);
       finalized();
   }
}