GOTO

First Class Functions are GOTOs.

CPS - Continuation Passing Style - is GOTOs on steroids.

GOTOs first appeared in Assembly language.

CPS was borne out of /CC functions in Scheme.

Utility

First Class functions & CPS are very useful in Denotational Semantics (to express control-flow).

Otherwise, 1st class functions and CPS should not be used in lieue of more structured expressions of control flow. What are these more structured versions? GOTO Statement Considered Harmful might provide clues.

Current usage of 1st class functions is Structured only because of the severe restrictions imposed by FP - one-in, one-out1 model of computing (aka “synchronous calculator”).

Lambdas

Lambdas first appeared in Lisp (approx. 1956) based on lambda calculus.

See Also

References
Table of Contents

  1. Exceptions are but warts, bags on the side of one-in/one-out syntax.