Re:JavaScript is Dead. Long Live JavaScript
by Dn_Ab on Sunday June 26, 2011 @11:26AM
(#2698167)
CoffeeScript allows loops no? Therefore it is turing complete (practically).
[ Parent
| on HN ]
I was giving a simple metric by which to check turing completeness. If the language allows you to do infinite loops e.g. "while loops" then it is turing complete.
Practically you need some desicion making control structure (cond, if) and an emulation of read/write tape (arrays)
Well actually unbounded recursion and infinite memory is what is required for turing equivalence. Conditioning can be present in a non turing complete language. I added the practically because all computers on which language models are built on are finite. It is easier to get turing completeness than to ensure you haven't accidently allowed it to sneak in - as evinced in C++ templates.
http://en.wikipedia.org/wiki/Primitive_recursive_function#Co...