[Python-Ideas] Link: Bidirectional Aliasing in Python
The proposal introduces “Link,” a language feature allowing multiple variable names to reference the same underlying object within a namespace. Denoted as a >< b or link('a', 'b'), this creates bidirectional aliases that maintain synchronization across all names.
The Good
Cognitive Load Reduction “easier to wrap your head around. If we can add another meaningful name. Less cognitive load for coder” by allowing alternative names that clarify intent without code duplication.
Simplifies Property Management Rather than using @property decorators and setters, developers could write cleaner class definitions with direct alias statements.
Accommodates Different Vocabularies Enables libraries to offer multiple naming conventions simultaneously, supporting developers with varying language backgrounds without breaking compatibility.
Jupyter-Friendly Provides explicit non-copying assignment, preventing accidental data duplication in interactive notebooks.
The Bad
Novel Without Precedent No existing programming language implements this feature, creating an unknown learning curve with limited resources.
Contradicts Python Philosophy Violates principles from “The Zen of Python”: “In the face of ambiguity, refuse the temptation to guess” and “There should be one — and preferably only one — obvious way to do it.”
The Ugly
Multilingual Collaboration Challenges When teams use different language names in the same codebase, developers must constantly cross-reference naming conventions, creating cognitive friction rather than relief.
Note: Author acknowledges a September 26, 2019 rewrite addressing this proposal’s concerns.