i searched net for the topic, and have a thought.
because c's function is static, when compiled, suppose, we have 2 object x and y.
when we call x.a() and y.a(), because a() is a static function, if infomation about x and y is not sent to the function, it will not know. think again..., no, it cannot. so "oop in c" is done on the base of a(self,args,...), such way.
the ooc.pdf is also in the base.
that hurts. say x.a(arg1).b(arg2).c(arg3) can never written in its way, instead, should be c(b(a(x, arg1),arg2),arg3) . think if you should write 1+2*3-4 in way of "- + 1 * 2 3 4 ", the same meaning.
that is language, a language can do anything in theory, but the way means.
没有评论:
发表评论