摘要:
原文地址:http://numbergrinder.com/node/29Objective-C设计模式:Singleton Pattern当迁移到一种新的编程语言时,需要面临的问题之一就是怎样设计对应于该语言的设计模式。大部分情况语言为设计模式提供了易于实现的内建支持,或者干脆拥有直接实现了这种设计模式。举 例来说,在Python中,实现Command Dispatch模式和Singleton模式几乎时完全不必要的,你只需要在创建的模块(module)顶部插入"""This module implements the singleton pattern" 阅读全文
posted @ 2012-07-18 08:38 rosylxf 阅读(3349) 评论(0) 推荐(1)
浙公网安备 33010602011771号