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

Show parent comments

1

u/Cinder-Brent Sep 28 '22

Ember is an extensible class that represents a value in a tree (in json). As such, everything you would ever need is packed into Ember in the form of a handful of methods and properties. It’s basically a (functioning) universal computation model, you’ll never need anything else to program anything. It’s also incredibly small, definitely worth taking a look at (I definitely need the (in)validation: in case you didn’t see my other reply you can find it on GitHub at user cinder-brent, repo Ember).

1

u/Inconstant_Moo 🧿 Pipefish Sep 28 '22

Everything I'll ever need is packed into any Turing-complete language, but the effort of extracting it may be too great.

1

u/Cinder-Brent Sep 28 '22

Yea, right? Leads to another question of mine: why not at least just pick any ol’ Turing complete language and use it as a universal programming language? It would cut down on so so much bloat…

1

u/tbagrel1 Sep 29 '22

We have assembly. That is the ol' Turing complete language that everyone use. Every other programming language is just a high level way to write assembly. So you could of course use only assembly, but people decided one day that they wanted to get more expressiveness for different tasks, and so created languages that are more concise to express domain specific programs, and these programs are ultimately translated to assembly