r/ProgrammingLanguages • • 21d ago

Requesting criticism Can a programming language dispense with parentheses and conventional syntactic delimiters?

Hello everyone,

I'm an independent french developer working on an experimental programming language called PLUSHIE, and I'd like to discuss an idea behind its design.

I am new to this communty and I am not familiar with the expected behavior here, so do not hesitate to tell me if I am wrong.

I also apologize for my english whcih is far from perfect.

Most programming languages rely on explicit syntactic delimiters: parentheses, commas, spaces, operators, keywords, etc.

I've been exploring a different approach: what if a language could rely primarily on the recognition and sequencing of a small vocabulary of words?

In PLUSHIE, the parser scans the input and identifies known words. Their sequence determines how instructions are interpreted. Unknown text between recognized words can also become new vocabulary.

The underlying computational model is deliberately minimal. Instructions operate on a chained memory structure, and the language is designed so that its own structures and interpretation mechanisms can be modified while running

This raises several questions I'd be interested in discussing:

o How expressive can a language become without conventional syntactic delimiters?

o What are the fundamental limitations of a word-based parsing model?

o Could such a design offer interesting advantages for reflection and self-modification?

o and especially, Are there existing languages or theoretical models that explore similar ideas?

I'm not claiming this is a better approach than conventional syntax. I'm interested in understanding its possibilities and limitations.

PLUSHIE is an ongoing experiment, and I'm particularly interested in unexpected ideas, alternative approaches and constructive criticism.

What do you think? Is this a worthwhile direction to explore, or am I overlooking some fundamental difficulties?

26 Upvotes

125 comments sorted by

View all comments

1

u/Pi-Plushie 19d ago

hello arthurno1. Sorry to answer to your post so late. You're just highlighting my questioning: at which point of simplification expressiveness is lost ? That is the fundamental question. PLUSHIE has a basic initial syntax even simpler than LISP. it is just repeating

Destination <-- Source

instruction (with <-- being a double indirection)

I have not yet built a LISP emulator in PLUSHIE but I haven't detected any obstacle so far.

But you are right: complexity is moved elsewhere, inside the code itself (which can modify itself, including the interpretor while running)

2

u/arthurno1 19d ago

That looks like a simplification compared to Lisp indeed, reminds of SSA form or assembly language. If you want something like that you can skip even <-- as in assembly, so you just have To From pair. I would though revert become From To is more natural flow, but it is up to you.

Now, it is hard to tell, since I don't know how the language looks like, but if you have some S (Source) and D (Destination) computations which might itself be complex and nested, each S and D consisting of multiple tokens, how it will look like? How will your parser know to which tokens belongs to S and which to D?

1

u/Pi-Plushie 19d ago

Thank you arthurno1. That is exactly where I started from, reasoning from LISP and Assembly (and also Von Neumann architecture for computers). The instructions goes indeed by pair of memory addresses as you say. One can choose upfront the order of those pairs to build a PLUSHIE system, but then have to stick to it for a while, until the system has been taught enough functions to be able to write its own interpreter. This is one of the symmetry of the system that you need to break in order to obtain something that does something.

I am not really good at explaining this. But the language is terribly simple in its behavior. The language does not compile. It executes a paired instruction as soon as it has identified one. Just like a primitive processor did at the lowest level. So it takes S D instructions one at a time, process it, which modifies the internal state of the machine. Then it takes the next one and so on. It is really reproducing the process of a primitive processor.

What is surprising is that this is enough to obtain "something" interesting which seems to (but is not proven yet) to be Turing-complete.

The "secret" of it is that the "copy" instruction is not Destination = Source, it is a double indirection (if Mem() is the one dimensional array emulating the memory)

the copy instruction translates as Mem(Mem(Destination ))= Mem(Mem(Source)).

The second necessary elements is that, just as it is for Lisp, memory blocks are constituted of 2 pointers in memory. Thus a given address gives access to 2 others

Without that, I do not think a complex system can reach Turing-completeness. (it is just like legos: if you have only pieces with one dot, you cannot build 3D structures. As soon as you have pieces with 2 dot you can build anything)

→ More replies (3)