3

Non-turing complete languages can solve every practical problem that a turing-complete language can. Also, they are much more analyzable than turing complete languages. The compiler can comprehend the program as a whole, predict/compute/cache every possible computation in advance, optimize it the most mathematically possible and even prove it has done so. It is like a super fusion between static typing and lazy evaluation in roids.

Yet nobody is trying to design a non-turing complete language like COQ that is practical and usable. Why?

MaiaVictor
  • 5,860

2 Answers2

7

Non-turing complete languages can solve every practical problem that a turing-complete language can.

Wrong. You cannot, for example, even do something as simple as implement the game of Life in a non-Turing complete language. Why? Because the game of Life is Turing complete.

Once that hypothesis is seen to be false, the answer to the question is obvious.

btilly
  • 18,340
5

One effort in this direction is the Hume family of languages, the last of which is Turing complete,

HW-Hume: a hardware description language — capable of describing both synchronous and asynchronous hardware circuits, with pattern matching on tuples of bits, but with no other data types or operations [27];

FSM-Hume: a hardware/software language — HW-Hume plus first-order functions, conditionals expressions and local definitions [26];

Template-Hume: a language for template-based programmimng — FSM-Hume plus predefined higher-order functions, polymorphism and inductive data structures, but no user-defined higher-order functions or recursive function definitions;

PR-Hume: a language with decidable termination — Template-Hume plus user-defined primitive recursive and higher-order functions, and inductive data structure definitions;

Full-Hume: a Turing-complete language — PR-Hume plus unrestricted recursion in both functions and data structures.

http://www.hume-lang.org/

ja.
  • 234