Smalltalk超类vs元类? [英] Smalltalk superclass vs metaclass?

查看:96
本文介绍了Smalltalk超类vs元类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是OOP的新手,但是具有过程"背景.

I new to OOP, but with a "procedural" background.

我目前正在尝试通过GNU Smalltalk和Lovejoy的"Smalltalk:获取消息"来了解OOP.

I'm currently trying to get my head around OOP via GNU Smalltalk and Lovejoy's "Smalltalk: Getting The Message".

对于元类和元类类与超类之间的关系,我感到困惑.我可以看到超类->类->子类的继承流程;但我看不到元类的适合方式/位置.TIA ...

I'm confused as to the the heck the metaclass and Metaclass class are, vs superclass. I can see the inheritance flow of superclass -> class -> subclass; but I don't see how/where metaclass fits in. TIA...

推荐答案

免费在线书 Pharo通过示例,第13章(类和元类).本章介绍的内容对于所有Smalltalk实现都是通用的.

There is an excellent description in the free online book Pharo by Example, Chapter 13 (Classes and metaclasses). The things explained in this chapter are common to all Smalltalk implementations.

这篇关于Smalltalk超类vs元类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆