"Fossies" - the Fresh Open Source Software Archive

Member "flow-0.148.0/website/_posts/2017-08-25-Private-Object-Properties-Using-Flows-Opaque-Type-Aliases.md" (1 Apr 2021, 774 Bytes) of package /linux/www/flow-0.148.0.tar.gz:

As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

In the last few weeks, a proposal for private class fields in Javascript reached stage 3. This is going to be a great way to hide implementation details away from users of your classes. However, locking yourself in to an OOP style of programming is not always ideal if you prefer a more functional style. Let’s talk about how you can use Flow’s opaque type aliases to get private properties on any object type.