Side Effect

A side effect in programming occurs when executing a function results in something else happening other than strictly performing the function and receiving the standard output. This might mean that a variable‘s value changes while being calculated in a function. Declarative programming languages rarely have side effects; the code is straightforward and does not detail every step needed to complete a function. If the objects they use are immutable, which in declarative programming they typically are, functions will behave the same each time they run, without having side effects in another part of the program.

A side effect often changes the state of the program itself, not just the local area in which it appears. This is sometimes known as a “global” change, when it changes the values of variables outside that particular function’s local area. Of course, for an application or computer program to work, it does need to allow modification through side effects: outputs sometimes must change. And databases will have many side effects as data changes and mutates. But there are benefits to purely functional programming as well.

Functional programming, which avoids side effects, is easier for developers to read and analyze. Pure functions (which have no side effects) perform the same calculation each time they are repeated, with no variation or side effect. Avoiding side effects in a program makes it more readable and reliable.

Jenna Phipps
Jenna Phipps
Jenna Phipps is a writer for, Enterprise Storage Forum, and CIO Insight. She covers data storage systems and data management, information technology security, and enterprise software solutions.
Get the Free Newsletter
Subscribe to Daily Tech Insider for top news, trends & analysis
This email address is invalid.
Get the Free Newsletter
Subscribe to Daily Tech Insider for top news, trends & analysis
This email address is invalid.

Related Articles

Virtual Private Network (VPN)

A virtual private network (VPN) encrypts a device's Internet access through a secure server. It is most frequently used for remote employees accessing a...

Gantt Chart

A Gantt chart is a type of bar chart that illustrates a project schedule and shows the dependency between tasks and the current schedule...

Input Sanitization

Input sanitization is a cybersecurity measure of checking, cleaning, and filtering data inputs from users, APIs, and web services of any unwanted characters and...

IT Asset Management Software

IT asset management software (ITAM software) is an application for organizing, recording, and tracking all of an organization s hardware and software assets throughout...


ScalaHosting is a leading managed hosting provider that offers secure, scalable, and affordable...


Human resources information system (HRIS) solutions help businesses manage multiple facets of their...

Best Managed Service Providers...

In today's business world, managed services are more critical than ever. They can...