Now I have the ability to say, I've got a new class, I can create instances of a line segment, and it's elements are themselves instances of points. OK?
这就是我们要讲模块化的地方了,现在我可以说,我创建了一个新类,我可以创建线段的实例了,这些实例的元素?
Some people have argued there's a module for sociology, for dealing with human groups, races and classes and so on.
有些人认为大脑中存在一个社会学模块,用以面对各种人类团体,种族以及阶级等
OK. Having done this now, I can simply go ahead and run this, and in fact if I go up here to run, you'll see I've got both an option to check the module, though in this case I'm just going to run it.
好,讲完了这些,我可以去执行程序了,实际上如果我在这里运行,你们会看到我同样得到了,一个可以同时检查模块的选项,虽然在这个例子中我就是直接去运行程序了。
So here we have a repeat block.
在这里我们有一个重复模块。
Another question is if you believe in modules-- if there are modules, what are they?
另一个问题是,如果你相信模块理论,如果模块是存在的,那么它们究竟是什么
Some have even argued that there is an intuitive biology, a common-sense biological understanding of the world that's separate from your understanding of people and physics.
有些人甚至认为,大脑中存在着一个直觉生物学模块,这是一种与所具有的人类及物理学知识,并不相同的常识性生物学知识
I've captured a module inside of a function.
将一个方法内放入了一个模块。
But other people have argued that there is a special module in your brain for dealing with artifacts, that is, things like tables and chairs and cars and forks.
但也有其他人认为,在大脑中存在一个特殊的,专门应用各种人工制品的模块,这些人工制品包括了桌椅,汽车,以及刀叉等
Final question, just to raise: I've talked in terms of the modular view but there might also be profound general differences between children and adults, not just specific to how you think about objects or how you think about people or how you think about this or how you think about that, but rather more general.
再说最后一个问题,我刚才是从模块理论的角度来讲述的,但在儿童与成人之间,或许还存在着深刻的一般性差异,不仅仅是具体到如何看待客体,如何看待他人,或是如何看待这个,如何看待那个,相反会更加一般化
I now have a module.
我在这里有一个模块。
What we're really getting at is the idea of saying I want to have a way of grouping together information into units that make sense. So I can go back to one of those topics we had at the beginning, which is the idea of abstraction, that I can create one of those units as a simple entity, bury away the details and write really modular code.
组合成为有意义的单元,那么这就让我们回到,一开始讲的话题之一了,这就是抽象的概念,也就是我可以以一个简单的,实体的形式创建这样的一个单元,把具体实现隐藏然后写一些,真正模块化的代码,我们在以后的课程中。
应用推荐