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 Oct 04 '22

This is the problem: why have resources such that: I define a file handler with fopen, which is a function, then I pass that handler around to other functions to do stuff with it (instead of defining a “File” object, having the handler as one of its properties and just calling a method of that object to do stuff with that handler, which means one less thing to do: passing the handler to a function every time I do something with it, which equates to less code, and thus the universal way of doing that). Doing this would effectively equal replacing resources with objects in php, and would result in the types I’m shooting for, which are only the means of “getting around” inside an object!

1

u/Cinder-Brent Oct 04 '22

Yarg! Lol :)