10 Matching Annotations
- Jun 2023
-
stackoverflow.com stackoverflow.com
-
When you lose encapsulation, you lose the contract of the declaring class; you cannot guarantee that the class behaves as intended or expected.
-
Using a property or a method to access the field enables you to maintain encapsulation, and fulfill the contract of the declaring class.
-
Anything that isn't explicitly enforced by contract is vulnerable to misunderstandings. It's doing your teammates a great service, and reducing everyone's effort, by eliminating ambiguity and enforcing information flow by design.
Tags
- using properties to abstract, encapsulate, and control access to private instance variables/data
- properties vs. direct access to instance variables
- eliminate ambiguity
- good point
- data flow
- contract (programming)
- explicit interfaces
- misunderstanding
- being explicit
- encapsulation (programming)
- by design
Annotators
URL
-
- Mar 2022
-
-
In 1994, The Unix-Haters Handbook was published containing a long list of missives about the software—everything from overly-cryptic command names that were optimized for Teletype machines, to irreversible file deletion, to unintuitive programs with far too many options. Over twenty years later, an overwhelming majority of these complaints are still valid even across the dozens of modern derivatives. Unix had become so widely used that changing its behavior would have challenging implications. For better
-
- May 2021
-
-
Adapters are required to make Request globally available if it isn't already part of the target platform. It's part of the (currently undocumented) contract — see e.g. adapter-node
-
- Oct 2020
-
en.wikipedia.org en.wikipedia.org
-
"Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program." See also design by contract.
-
-
dmitripavlutin.com dmitripavlutin.com
-
What is an iterable object in JavaScript? It’s an object that supports the iterable protocol.
-
-
-
Indeed, this simple contract is very close to that of an observable, such as those provided by Rxjs. set is basically equivalent to next in the observable world.
-
The $ contract for auto-subscribing is lovely in its simplicity and flexibility. You can adapt your own preferred state-management pattern or library, with or without Svelte stores as helpers. Svelte does not fuss about how you want to manage your state.
-
- Nov 2019
-
gist.github.com gist.github.com
-
This naming convention helps developers understand the component’s contract
-