Why I’m Excited for JavaScript Class Private Fields: A Case Studyby@nas5w
3,513 reads
3,513 reads

Why I’m Excited for JavaScript Class Private Fields: A Case Study

by Nick Scialli3mFebruary 21st, 2019
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

In JavaScript, new instances of objects have a prototypal inheritance relationship with their parents and there is no such thing as private or protected properties. The ECMAScript Technical Committee is considering private class fields as a type of type type. JavaScript's hope yet for privacy in our JavaScript classes is that it will soon be able to designate private fields in our classes simply by simply naming them as private. I tried several ways but ultimately failed to (satisfactorily) achieve property privacy in JavaScript. I have a module that works but sacrifices some property and method privacy.

Company Mentioned

Mention Thumbnail
featured image - Why I’m Excited for JavaScript Class Private Fields: A Case Study
Nick Scialli HackerNoon profile picture
Nick Scialli

Nick Scialli

@nas5w

Husband, dog dad, coffee monster. Software engineer at the @usds! Opinions are my own

About @nas5w
LEARN MORE ABOUT @NAS5W'S
EXPERTISE AND PLACE ON THE INTERNET.

Share Your Thoughts

About Author

Nick Scialli HackerNoon profile picture
Nick Scialli@nas5w
Husband, dog dad, coffee monster. Software engineer at the @usds! Opinions are my own

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
L O A D I N G
. . . comments & more!