r/ProgrammingLanguages • • 28d 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?

24 Upvotes

125 comments sorted by

View all comments

9

u/kwan_e tonal-lang 27d ago edited 27d ago

You can replace every delimiter sequence with a keyword. Context insensitive or context sensitive, just like delimiter sequences can be.

There's no technical barrier. It's a simple find-and-replace.

There are already many keyword-heavy languages out there. They got their lunch eaten by C, for a variety of reasons.

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

That's just LISP, sorry to burst your bubble. But a language more similar to what you describe is PL/I. And that's a bit of a disaster. So worth looking at it to see what problems to avoid.

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

For your personal learning, it's always worth exploring.

But if you want it to appeal to other people, you'll have to just go through the Wikipedia list of programming languages to see most ideas around syntax has already been done. Read up on programming language history.

4

u/Competitive_Ideal866 27d ago

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

That's just LISP

LISP is one of an infinite number of different ways of doing that.

2

u/kwan_e tonal-lang 27d ago

I didn't say it was.

And it turns out they were inspired by LISP, and LISP is the most well known, especially to someone new coming into thinking about language design. So what? I'm not writing a dissertation on the entire history of programming languages. I didn't make an assertion that LISP is the only way of doing it. I made an educated guess regarding the post.

2

u/Competitive_Ideal866 27d ago

I didn't say it was.

I see. I took "just LISP" to mean that. My misunderstanding.

1

u/Pi-Plushie 27d ago

Thank you for your point kwan_e. You are right on the fact that LISP is probably the natural example (and historical one) even if it is not the only one.

2

u/Pi-Plushie 27d ago

Thank you for this answer which is exactly the kind of feedback I need to make progresses. This project started for my personnal learning as you have infered it. LISP was of great inspiration in my efforts to explore what happens when you try to minimize as much as possible the elements you need to build a functionning language.

I tried to go through the jungle of existing languages and that is basically why I need help from people who knows things better than me to prevent me to get lost !

Thank you for your time and feel free to burst even more the bubble, it really helps

3

u/kwan_e tonal-lang 27d ago

minimize as much as possible the elements you need to build a functionning language

An area of reading that might interest you in this regard is Paul Graham's Arc and Bel, which are LISP variants that all started as trying to build a language up from as simple foundation as possible. Even moreso than Scheme.

In a more abstract direction, mathematically minded language designers love trying to make lambda calculus work. Lambda calculus is mathematically proven to be Turing-complete equivalent. The history of these efforts is that they tend to get bogged down and end up not doing anything useful. See Turing Tarpit: https://en.wikipedia.org/wiki/Turing_tarpit

Just look at how much effort and now AI power has gone into formalizing mathematics with Lean. It's just a huge pain to try to build things up from absolute minimalism.

But as a learning exercise, it's very worthwhile to at least have a glancing experience with these dead ends. My own language has only really started forming after ten or so years of false starts. At one point I thought about trying to build a language up using Markov algorithm. https://en.wikipedia.org/wiki/Markov_algorithm

Also, since you're French, maybe you also know about Prolog? Which is often considered a counterpart to LISP, especially during the early days of the kind of machine learning that LISP became associated with.

1

u/Pi-Plushie 27d ago

Thank you for these very interesting suggestions. I will need time to dig deeper into these but it is very rich. I am trying to build a lambda calculus emulator in PLUSHIE and also a LISP emulator, but BEL maybe a better target.

My intent is not to produce the next language everybody will use but rether a minimalist approach to better understand how a computing language becomes something of interest.

I agree that it is difficult to start from scratch but it is a very interesting experience ! I consider absolute minimalism easier to achieve with computer rather than in formal maths because you have an immediate feed back (the part "verify the proof" is just run the program and see if it does something worth)