Re:I created the BIPLAN programming language, what do you th...
by avhon1 on Tuesday February 16, 2021 @05:11PM
(#26159408)
This is Polish Notation, and it does not have this problem as long as you don't allow variadic functions. If functions always consume the same number of arguments, it's no problem at all.
This is basically how concatenative stack-based languages do it, although by convention they put the arguments before the function call. (Reverse Polish Notation) In Forth, your example would be written one of the following two ways, depending on whether multiply() or sum() is consuming the extra 2:
2 2 2 * 2 + +
> 8
2 2 2 * * 2 +
> 10
Also valid would be:
2 2 2 * 2 +
> 2 6
where the left-most 2 is not consumed, but rather is left in place.
ie: sum 2, multiply 2, 2, 2
for which function is the last parameter for?
You are right about the function names, I am not forced to use the camel form which I do not love, it could be serial_write or even serial write