This combining of data and functions on that data is a very essence of object-oriented programming That's really what defines it.
数据与函数的结合,是面向对象编程的核心,这也就是它的定义。
Now these ideas of classes, object-oriented programming, data abstraction, are about 40 years old, they're not new ideas.
面向对象编程的概念,数据抽象的概念,都是40年前就有的老东西了。
So what is this all about? What is an object in object-oriented programming?
所以它到底是什么呢?,面向对象编程中的对象到底是什么呢?
PROFESSOR: Last time, Professor Guttag introduced the idea of objects and classes and this wonderful phrase called object-oriented programming.
教授:上节课,Guttag教授,介绍了对象和类的概念以及,面向对象编程这个美妙的短语,这是我今天想继续讲的一个话题。
And today nobody advocates a programming language that does not support it in some sort of way.
今天没有人会推荐一种,不支持面向对象编程的语言。
So in fact what happens inside of an object-oriented system, and particularly in init Python's object-oriented system, is the following.
面向对象系统的内部,尤其是在Python的面向,对象系统的内部的过程,就是如下的,当我们调用,它会去创建一个实例。
There's this weird extra variable in there called self.
好,这是关于面向对象编程,我们需要谈论一点的东西。
As we talk about this, as people talk about this, in the context of our object-oriented programming, they typically will talk about it in terms of message pass, a message passing metaphor.
当我们讨论这个的时候,当人们讨论这个的时候,在面向对象编程的背景下它们往往会,被称为消息传递,也就是传递隐喻的消息。
I'd argue that MATLAB is basically a targeted language it's targeted at matrices and vectors and things like that.
我认为MATLAB是有特定处理对象的语言,它主要,面向矩阵和向量等。
应用推荐