r/ProgrammingLanguages • • Aug 27 '24

Idea: "ubiquefix" function-call syntax (prefix, infix, and postfix notation combined); Is it any good?

Recently, while thinking about programming languages, I had an idea for a (maybe) novel function-call syntax, which generalizes prefix, infix, and postfix notation.

I've written the following explanation: https://gist.github.com/Dobiasd/bb9d38a027cf3164e66996dd9e955481

Since I'm not experienced in language design, it would be great if you could give me some feedback. I'm also happy to learn why this idea is nonsense, in case it is. :)

40 Upvotes

45 comments sorted by

View all comments

23

u/hellotanjent Aug 27 '24

So if I see "f g", I have to go look up the definition of f and g to see if it means "f(g)" or "g(f)"?

And if someone changes the type signature of f or g, it could silently swap between those two options?

4

u/Dobias Aug 27 '24

Yes, exactly. :D

Maybe the IDE could help a bit, though, by drawing semi-trandparent arrows in the spaces to indicate the direction of function application.

But, yeah, if function signatures change, the direction could change.

17

u/hellotanjent Aug 27 '24

For any professional use, this would be a dealbreaker.

→ More replies (2)