NO OUTPUT ARGUMENTS - Deepstash

NO OUTPUT ARGUMENTS

Functions should avoid modifying the state of their inputs. Instead, return the results. This practice leads to clearer and more predictable code.

  1. Review your functions today. Do any of them modify their arguments? Could they be refactored to return the results instead?
  2. Have you experienced confusion or bugs related to functions modifying their arguments? How could this have been avoided?

226

802 reads

CURATED FROM

IDEAS CURATED BY

asimhusanovic

As an engineer with an official degree in software engineering, I am primarily interested in science and technology. I enjoy reading literature of many genres, and I especially like those from human behavior, sociology, history, and, should I say, science

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Personalized microlearning

—

100+ Learning Journeys

—

Access to 200,000+ ideas

—

Access to the mobile app

—

Unlimited idea saving

—

—

Unlimited history

—

—

Unlimited listening to ideas

—

—

Downloading & offline access

—

—

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates