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

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

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

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

@nas5w

Nick Scialli


Receive Stories from @nas5w

react to story with heart
Nick Scialli HackerNoon profile picture
by Nick Scialli @nas5w.Husband, dog dad, coffee monster. Software engineer at the @usds! Opinions are my own
Read My Stories

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa