Assignless

From Esolang
Jump to navigation Jump to search
This article is not detailed enough and needs to be expanded. Please help us by adding some more information.
This is still a work in progress. It may be changed in the future.

Assignless is a work in progress esoteric programming language by User:Rdococ.

Overview

Assignless is an esoteric programming language without assignments. Rather, you must pass modified values to subroutines.

void loop(int step, int input) {
     printf("Step %d.\n", step);
     if(step < input)
          loop(step + 1, input); # We (automatic) return here to take advantage of tail call optimization.
}

int main() {
     loop(1, inputf("How many steps?: %d\n")); # yep, this is input.
     return 0;
}

This program lists all of the entries in an input array. Note how nowhere is a variable technically assigned by the programmer, not even in a for loop. Rather, each subroutine in the program must pass modified values onto another subroutine in order to assign variables - perhaps using some form of recursion, too. This is the basic premise of the language.