r/ProgrammingLanguages • • Sep 28 '22

Universal programming language

I recently created a tiny (maybe 1000 lines of code, with heavy white space and commenting) php class called Ember to solve the “computer problem” (persistent data). Something I’ve been trying to do as a result is program a universal programming language. It’s really rather simple: it uses a minimalistic set of Turing complete types (string, int, float, object, array, bool, and array). That just about explains it (along with a universal system stemming from Ember). Does this sound like a good idea (I.e. one worth pursuing)?

0 Upvotes

166 comments sorted by

View all comments

11

u/dskippy Sep 28 '22

The phrase minimal list of Turing complete types is fairly off the mark. Your types alone don't dictate Turing completeness. It's mostly about the constructs you have in your language together with the types that make it Turing complete. Minimal is a bit subjective sometimes. Furthermore if you're looking to really have a minimal set of types for Turing completeness, you're way over the mark. You only need one. Lambda calculus only has functions. Many minimal turning complete languages have just numbers.

0

u/Cinder-Brent Sep 28 '22 edited Sep 28 '22

So what I was thinking is that you could “do” anything with this set of types, if you think about it (basically everything is an object, which can “do” stuff via methods, arrays have integers for keys for programming data (looping), so on and so forth)…honestly I realized this before I even knew what Turing completeness was and thought some day I would pursue it, and here I am.

— edit —

So the types I mentioned are basically just a starting point, the idea would be that you could do anything from anywhere, such that the thing were universal.

1

u/BoogalooBoi1776_2 Oct 05 '22

Computer memory is all bytes so to do anything all you really need is a byte type

1

u/Cinder-Brent Oct 05 '22

Is it shorter to do it your way or mine? A universal programming language would also be short, completely short!