Currently, there's no such programming language that satisfy all of your conditions. However, there are in fact some programming languages that have one or more of the characteristics you mentioned:
- Forth: This is by far the closest one to what you're looking for that I can find. It uses reverse polish notation, is stack-based, and is concise in its syntax. However, it does use whitespace as a delimiter. Also, it uses the standard
if
-statement for conditional control-flow, albeit in a slightly different way, due to the fact that it is a stack-based language. Forth functions (subroutines) are called "words", and are usually small and concise, although there's no restriction of the length of the words' names.
- APL: This is also very close to what you're looking for. Early implementations of the language do not have any control-flow statements (
if
-elseif
-else
, for
, do
-while
, ...etc), rather programmers of this language use array operations to perform the task. APL syntax and operators uses many non-ASCII (Unicode) characters. For example, the Unicode character "ι" is used for iteration, "←" used for assignment, "+" is used to add a number to all elements of an array (versus appending), and "×" for multiplication. Note that APL does not satisfy the other features you mentioned; it uses parenthesis as part of the syntax, does not use reverse polish notation, and allows multiple-letter names. Whitespace is also required as part of the syntactic model.
- Whitespace: For a programming language that is special in whitespace, this one should have a spot. However, this is the exactly opposite of what you're looking for; this programming language only uses whitespace as syntax. It's also an esoteric language, so don't use it for practical purposes.
Finally, let's evaluate the conditions you listed for their practicality:
-
no need for whitespaces, only between numbers, all identifiers are one-lettered. If we need a long identifier then use an indexed table element.
As far as I can find, no (at least no used) programming language had a syntax that does not require any form of whitespace delimiting. There's not much sense in designing a language with such a feature anyway. I think the space key is perhaps the easiest key I can hit, and I would like to stick with that. As for single-lettered names, most programming languages allow single-letter names, but none enforce it. Again, there's not much sense in restricting the length of a variable or function name, since you can always do so yourself. So essentially, every programming language satisfy this condition. Note, however, that using single-letter names for everything in your program is almost always an extraordinarily bad software engineering practice. Using single-lettered names for some things are OK (think i
and j
for loop variables), but for everything it is not. See importance of variable names, single-letter variable names, the case of single-lettered names, naming classes- stackoverflow, and is single-letter names encouraged.
Polish notation: Many programming languages out there use reverse polish notation, so this one is not particularity hard to find.
-
indexing arrays, tables, functions are the same: f1, t'field'
This one is also common. For example, in Python, indexing a dictionary (equivalent to a hash map or table in other languages) is the same as indexing a list (array). However, I don't think there's any programming language that allows indexing of functions. I guess you're referring to the indexing of a heap stack of functions, which some stack-based programming languages do support.
-
no if operator. Instead we make an array of statements with condition as index.
Satisfied by APL. This isn't a common feature, so I guess APL is one of those, if not the only one that have this distinction.
I hope this helps!