The Deadfish i language is an object-oriented version of Deadfish with a BF-like syntax, created by Abraham Karplus. A Deadfish i file (extension
.dfi) is a sequence of object declarations. Note that this improved version does not restrict unsquared values to one byte.
A lot of child languages take the name of their parent and add "++". However, the Deadfish family uses the "i" command to increment. Hence, "Deadfish i".
The Deadfish i alphabet is much like the BF one, with a few differences:
,command: Deadfish i does not support input.
#character start a comment that goes to the end of the line.
- Unknown character are errors, not ignored.
An object is declared with the syntax
name is a positive integer or
method is a sequence of Deadfish i commands.
|+||Increment||self.val += 1|
|-||Decrement||self.val -= 1|
|>||Square||self.val **= 2|
A static call
[ is followed by a positive integer.
The method of the object with that number is called.
A dynamic call is a plain
]. It calls the method of the object
n is the value of the object using the dynamic call command. The value must be positive.
The program is begun by an implicit call to
Infinite loop (requires two objects since
0 cannot be re-called):