r/ProgrammingLanguages • Nain. • 1h ago

Would a syntaxless programming language be possible?

So I had the idea of a syntaxless programming language where a function parses its form as it needs.

In this system, a parser is a function turning a description of the syntax to a kind of binding

parser: forms -> (given syntax) -> binding;

For example:

template ([a] is in between [min] and [max]) # binding
  := a >= min and a <= max; # lambda 

Idk just a cool idea. There are many problems with this (for starters, when do you know what parser to use?)

0 Upvotes

20 comments sorted by

View all comments

Show parent comment

2

u/Key_River7180 Nain. 1h ago

idk:

parser(parser ([forms... :[string]])) := parse input and make a parser

You'd need a bootstrapping one of some kind

2

u/titaniumalt 1h ago

yes, i am talking about said bootstrapping language, how would that work?

4

u/Albert_Custard 1h ago

By having a syntax

1

u/Key_River7180 Nain. 51m ago

Probably implemented in the compiler

1

u/bl4nkSl8 37m ago

That's a syntax...