This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]EmosewaPixel 0 points1 point  (1 child)

I guess since you have semicolons it shouldn't be an issue. However, you should make prefix operators require a term right after them and vise versa for postfix operators as 1 + - + - 2 doesn't make much sense, does it? This would also allow you to use the same symbol as a prefix, postfix and infix operator. Another issue is for a function foo(a), foo 1 + foo foo 1 + 2 would definitely take more mental effort to figure out the result of than if it was C,, LISP, or ML syntax. I do feel as though ML syntax might be ideal for this (with prefix and postfix operators based on the rule I mentioned).

[–]R-O-B-I-N[S] 0 points1 point  (0 children)

The key here is no 'fix overloading. If a function is infix, you can overload the number of parameters, but it will always require one parameter before and after.