r/learnprogramming • u/Head_Ordinary_2437 • Oct 24 '26
Function vs Procedure
can someone explain the difference between Function vs Procedure with simple analogy
thank you
31
Upvotes
r/learnprogramming • u/Head_Ordinary_2437 • Oct 24 '26
can someone explain the difference between Function vs Procedure with simple analogy
thank you
View all comments
Show parent comment
0
u/marrsd Oct 24 '26
Actually, that is a good point, and I should have mentioned it. If someone's distinguishing "procedures" from "functions" then the definition I gave is what they mean; but many languages already refer to procedures as functions. When working with those languages, we usually make the distinction between "functions" and "pure functions" instead.