r/Compilers • u/Pi-Plushie • 23d ago
Can a programming language dispense with parentheses and conventional syntactic delimiters?
/r/u_Pi-Plushie/comments/1xqfqb0/can_a_programming_language_dispense_with/
0
Upvotes
3
u/pauseless 23d ago
Yes? Tcl works here - don’t be confused by `{}` in the language, as it is simply conceptually the syntax for making strings. I assume you’re not throwing out `""` or similar for strings? I assume you’d allow new lines to separate expressions?
Forth is probably the best, as mentioned by others.
You can get really far with APL before needing any kind of control structure. If you just want no parens, `(+⌿÷≢)1 56 23 4` can be written as:
mean←+⌿÷≢
mean 1 56 23 4
Not using parens and not using control structures such as for loops.
5
u/asperta 23d ago
Take COBOL as an example of a verbose language:
Just don't end up making kilometric source files!
4
u/bod_owens 23d ago
This sounds like Forth: a dictionary of words, extended at runtime, with the interpreter itself modifiable. Hard to say more because the terms are undefined: what is a 'chained memory structure', 'word-based parsing model's and are words whitespace-separated or matched as substrings? All of these are obviously made to sound like terms of art, but they're not. A five-line example would help more than the questions.
1
u/chibuku_chauya 22d ago
For parens, the various shells and Tcl do this by having it such that the first thing appearing syntactically is a command and anything that follows is an argument.