3 ms·
Seems like it's more an argument and prefix notation vs infix. z = Add(x,y) is just a form of prefix notation in my opinion. I would say that z = x + y feels
by FPGAhacker 8y ago
Seems like it's more an argument and prefix notation vs infix.
z = Add(x,y) is just a form of prefix notation in my opinion. I would say that z = x + y feels better because that's how we are taught in school. But in English at least, it's reasonable to say the following:
Z is X plus Y.
To get Z, Add X and Y.
---
It's also an argument about inconsistent syntax. For example there is not a big gap in lisp for (+ a b) and (add a b). It's a bigger difference in python.
---
I find infix for math easier to read because it's how I learned it. But I also use lisp, and appreciate being able to say (+ x y) and (+ x y z a b c) where plus might be more accurately read as sum.
That and in college I used an RPN calculator, and going from postfix to prefix isn't as odd as infix to prefix.
- hanniabu 8y agoIt'd come down to context for me. If it's 2 or maybe 3 items then I'd prefer x + y, but if it's any more than that I'd definitely use Add().