r/computerscience • • Feb 18 '26

Advice Trying to create LOOP language

Hello everyone,

I’m examining the idea of designing a loop-centric programming language inspired by the classical theoretical LOOP model and the broader minimalist philosophy associated with early systems language design. The core idea is to treat bounded or unbounded iteration as the primary computational primitive, with other constructs minimised or derived from it.

The language I’m experimenting with, Gamma Loop, transpiles to C for portability and optimisation, but my primary interest is theoretical rather than practical. Specifically, I’m curious whether revisiting a LOOP-style framework has meaningful value in modern computability theory.

Does centring a language around bounded iteration provide any new perspective on primitive recursive functions or total computability, or has this conceptual space already been fully explored?

I would appreciate theoretical insights or references relevant to constrained computational models.

0 Upvotes

14 comments sorted by

View all comments

Show parent comment

2

u/unsignedlonglongman Feb 19 '26

There's lots of nice ways of abstracting loops in lots of languages:

  • a function of some state, and functions that operate on that state: e.g. an update, and a condition. Recursively apply updates until the condition.
  • functions over collections (folds, maps)
  • unfolds (producing data until termination)
  • iterators and generators
  • streams and lazy sequences
  • reactive streams
  • state machines
  • loops as fixed point combinators
  • pi-calculus

But usually you add these abstractions to a language as "here's a nicer way of doing loops" (I'm always here for nicer ways of doing loops!) Not so much "build everything out of loops"

So I'd avoid trying to make this become "build everything out of loops just because every procedure is a loop with a break"

That feels to me a bit like saying "build everything out of branches, because every statement is actually an if statement with true as the condition"