in functional-programming

Statelessness in Functions

Stateless Functions in Functional Programming

Functions should be stateless in Functional style programming.  That means, they should not using any state of the objects data or maintain some state outside its scope for its execution.

By maintaining state, it is possible that the results of the function are not going to be consistent and then there is always concurrency issues where multiple threads could manipulate the state.

In this video tutorial, i have explained the importance of statelessness in functions and how functions should rely on the input parameters for calculation instead of relying on the state of the objects.

 

Srinivas Reddy

Srinivas Reddy

An IT - Specialist with loads of experience in Java, J2ee platforms and loves to share his experience on technology with You...

More Posts - Website

Follow Me:
TwitterFacebook

Related Posts

Srinivas Reddy
Written By:

An IT - Specialist with loads of experience in Java, J2ee platforms and loves to share his experience on technology with You...