DevOps Articles

Curated articles, resources, tips and trends from the DevOps World.

How to Make Pure Functions (Go)

4 years ago qvault.io
How to Make Pure Functions (Go)

Summary: This is a summary of an article originally published by the source. Read the full original article here →

Pure functions are often hyped up in the JavaScript world, probably because of the abundance of stateful front end applications. While pure functions have their downsides (i.e. inconvenience, potentially large argument lists), they should be used as much as reasonably possible.

According to Wikipedia, a Pure function has the following properties: Which means that as a developer I know two important things: Because of these properties, pure functions keep applications simple. As we know, simple applications tend to be faster, are easier to test and debug, and are less error prone in general.

That makes this a bad test, and we wrote the bad test because we have an impure function.

Made with pure grit © 2024 Jetpack Labs Inc. All rights reserved. www.jetpacklabs.com