Module pattern - Deepstash

Module pattern

The Module pattern is used to mimic the concept of classes so that we can store both public and private methods and variables inside a single object — similar to how classes are used in other programming languages like Java or Python. 

That allows us to create a public-facing API for the methods that we want to expose to the world, while still encapsulating private variables and methods in a closure scope.

11

37 reads

CURATED FROM

IDEAS CURATED BY

heathesoli

Engineer in control and instrumentation

The idea is part of this collection:

Machine Learning With Google

Learn more about computerscience with this collection

Understanding machine learning models

Improving data analysis and decision-making

How Google uses logic in machine learning

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