Modest opinions  
by a humble autodidact

2008年9月12日

摘要: 用Ruby有一段时间,把发现的gotchas总结一下: 1.不要用继承 本来继承就不是什么好鸟,早有人说过,Java的“extends is evil” 。而除了上述理由,Ruby还有自己的特性,使继承更加糟糕。第一个就是Ruby的instance variable不是提前声明在class definition里的,而是在instance methods执行过程中动态创建的,所以为了避免名字冲突这... 阅读全文
posted @ 2008-09-12 14:46 yushih 阅读(310) 评论(0) 推荐(0) 编辑