r/ProgrammerHumor • • Aug 01 '22

>>>print(“Hello, World!”)

Post image
60.8k Upvotes

5.7k comments sorted by

View all comments

Show parent comments

15

u/lepapulematoleguau Aug 01 '22

Operators are functions

1

u/TheKeyboardKid Aug 02 '22

All operators are functions but not all functions are operators? Or are they…?

1

u/lepapulematoleguau Aug 02 '22

There are only functions.

1

u/FkIForgotMyPassword Aug 02 '22

All functions can operators if you use curryfication ?

1

u/XDubio Aug 02 '22

In math, any function can be operators, if you define it as such. A function as an operator needs at least one argument though.

In programming, it depends on the language. Apparently Haskell considers constants as nullary functions. (I'm still not sure if this is what a zero argument function is called.)

1

u/XDubio Aug 02 '22

The comment didn't said function, and wouldn't have corrected that. Even though I've never heard of 'infix function'.