-- [Bridge Mode: separates abstract parts from their implementations so that they can all change independently. In fact, the bridge mode is widely used in development and application. Even if we do not learn the bridge mode, it may be used subconsciously. For example, in Game Development, players (Role) synthesize a backpack (Knapsack); in a backpack (Knapsack), they combine items ); in fact, this synthesis is the "bridge" in the bridge mode. Note that merging is not inheritance! The following uses a mobile phone as an example] -- System = {} function System: new (n) o = {} setretriable (o, self) self. _ index = selfo. phonename = nreturn o; endfunction System: GetSystem () if self. phonename = "Iphone5s" thenreturn "IOS 7" elseif self. phonename = "Lumia1020" thenreturn "WP 8" endendCPU ={} function CPU: new (n) o ={} setretriable (o, self) self. _ index = selfo. phonename = nreturn o; endfunction CPU: GetCPU () if self. phonename = "Iphone5s" thenreturn "Apple A7/M7 coprocessor" elseif self. phonename = "Lumia1020" thenreturn "Qualcomm Adreno 225" endendMemory = {} function Memory: new (n) o = {} setretriable (o, self) self. _ index = selfo. phonename = nreturn o; endfunction Memory: GetMemory () if self. phonename = "Iphone5s" thenreturn "RAM capacity: 1 GB" elseif self. phonename = "Lumia1020" thenreturn "RAM capacity: 2 GB" endendCellphone ={} function Cellphone: new (n, o) o = o or {} setretriable (o, self) self. _ index = selfself. system = System: new (n) self. cpu = CPU: new (n) self. memory = Memory: new (n) self. phonename = nreturn o; endfunction Cellphone: ShowDetail () print (self. phonename) print (self. system: GetSystem () print (self. cpu: GetCPU () print (self. memory: GetMemory () endIphone5s = Cellphone: new () function Iphone5s: Description () print ("in three words, 'tuhaojin'") endLumia1020 = Cellphone: new () function Lumia1020: Description () print ("best camera phone, Nokia, quality assurance") endphone = Iphone5s: new ("Iphone5s") phone: Description () phone: showDetail () phone = Lumia1020: new ("Lumia1020") phone: Description () phone: ShowDetail ()