The ultimate programming language

by moodyharsh 2014-03-01
goto

The ultimate programming language

Assembly is perfect.
In assembly code = data. In fact that is the basis of the turing machine.
It is convenient for programmers to omit history.

The defect rate in an x86 processor is 0. How many bugs are there in your compiler ?
x86 is backwards compatible.

  1. Each instruction is executed in fixed time

  2. You can’t write boot code in your favorite $lang

  3. GOTO directly maps to a state transitions, branch/dispatch/control tables

This is a powerful programming technique.

  1. GOTO’s are easier to follow than recursion. Even novices understand GOTO’s. Besides
    recursion always needs an additional state variable, which is slow.

  2. Self-rewriting code is epic on all accounts and it beats Lisp’s macros.

Turing machine is made up of GOTOS and branches and yet modern languages restrict it.

How to imitate an unrestricted GOTO ?

  1. Mutual Recursion
  2. Tail Calls
  3. Fake an instruction set with an array.