Name Coupling

Posted by moodyharsh on 2016-04-27

[DRAFT]

All programming pathologically suffers from name-coupling.

By name coupling what I imply is how a function has to know the name of
the function or object it would like to call.

Hence there is a need extra for indirections to achieve basic modularity

  • Function Pointers
  • Dynamic Namespaces (packages in lisp)
  • Mediator / Messaging / Interceptor / Reflection / Dependency Injection / Service Locator / Proxy …
  • REST APIs
  • DLLs
  • Actors
  • Active Objects
  • Components

Electronics is the most visible example of nameless coupling.

Every so-called “Very High Level beyond Functional” language as of 2014
implements static bindings for names as the default.

Contrast to this, Assembly programming languages don’t need any complex
indirections like above because of the notion of indirect jumps or computed gotos.

SPARC: jmpl %o7
MIPS: jal $ra
X86: jmp *%eax
ARM: mov pc, r2
IA64: br.ret.sptk.few rp
6502: jmp ($0DEA)
65C02: jmp ($0DEA,X)
65C816: jsr ($0DEA,X)

This is an instruction level Proxy Pattern which naturally gives rise to modularity
and even self-modifying code.

Programming language designers are doomed to reinvent what is useful and forgotten with stupid names.