23) Over-Using Shared State - Deepstash

23) Over-Using Shared State

Every variable we define represents a shared state. It holds data that can be changed by all elements in the same scope as that variable. 

The more global the scope is, the worse the span of this shared state. Try to keep new states contained in small scopes and make sure they do not leak upward.

585

1.41K reads

CURATED FROM

IDEAS CURATED BY

sarakelly

Product designer

The idea is part of this collection:

Metaverse

Learn more about computerscience with this collection

Find out the challenges it poses

Learn about the potential impact on society

Understanding the concept of Metaverse

Related collections

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