DEV Community


Discussion on: Function in Every Programming Language

phantas0s profile image
Matthieu Cneude

A procedure and a function are not the same things in every programming language.

A procedure is just a block of code you execute (without returning anything), a function always return something.

The language Pascal for example makes a difference between the two. I know, not many people use Pascal anymore, but still.

In Mathematics, a function has a stricter definition and some functional programming languages try to stick to this definition (like Haskell for example).

iamrishavraj1 profile image
Rishav Raj Author

Thank you for explaining 😃

Forem Open with the Forem app