< The Science of Programming < SwayPresentations < Objects
Public and Private Components
Every component in a Sway Object is public:
- A belief that programming is not a adversarial exercise
- Simplifies the language (syntactically speaking)
However, it is possible, with a little bit of work, to make a component private. One method in Sway uses simple scoping rules (see the Class and Object Components page.
The other uses operator overloading.
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.