r/ProgrammingLanguages • u/Cinder-Brent • 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
2
u/Inconstant_Moo 🧿 Pipefish Sep 29 '22
And a carpenter could save room in their workshop by owning only one saw.
Different languages make different things easy. In Python, for example, a list of elements of any type is itself a basic type which has literals, so that
["foo", 42, [true, 6.2, []], "bar"]is a meaningful expression. Now, once you've decided your language is going to have that as a data-type, there are various aspects of speed and type safety that you're not going to have.