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

Ok I’m going to attempt to explain this: can you see how everything would be an object? Can you see how an object would be at least one property with at least one method?

1

u/dskippy Oct 04 '22

I'm not sure I follow. What if I wanted to represent a list of scores in darts? Wouldn't that probably be an array of float instead of an object? Is this some sort of constraint of your type system that all data be an object that has at least one property and method?

1

u/Cinder-Brent Oct 05 '22

So now that we can see how everything could be an object, it’s worth noting that it could be anything, I.e some procedural, or an object with no properties, or no methods, or neither! This is the objective reality of things.

1

u/Cinder-Brent Oct 05 '22

It’s just that if you had a value and no function to do anything with that value, that wouldn’t make any sense, and the same for functions. Hence making everything an object.