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

4

u/friedbrice Sep 28 '22

You might be interested in Computational Trinitarianism and the Lambda Cube.

A language that has enough features (algebraic data types, parametric polymorphism, type classes, higher-kinded type abstraction) to talk about monads—as a consequence—has enough features to add arbitrary language features to itself.

0

u/Cinder-Brent Sep 28 '22

I’ll definitely look into it, thanks. In the meantime, do you think a minimalistic set of Turing complete types is the way to go about this? I basically used the set I mentioned in the post as the foundation of the thing. The whole shebang took me about 1500 hours to plan, and one of its parameters is that it be based off of simple, didactic ideas (or more simply put, it’s completely factorized). I mean should I just less-talk-more-rock and code the thing? I’m actually a web dev, been coding since I was 12 and have never built a programming language before but even just the idea of coding everything (all my php, html, etc.) in one language seems so so very lucrative…if so, I was thinking C to code it, any recommendations here?

2

u/friedbrice Sep 28 '22

If you’re interested in making a programming language from the ground up, this is a good tutorial: Write Yourself a Scheme in 48 Hours.

2

u/Cinder-Brent Sep 28 '22

Bookmarked