类和对象 - 请解释 [英] Classes and objects - please explain

查看:80
本文介绍了类和对象 - 请解释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿所有,


PHP是我的第一个严肃的编程语言(有一些exp w /

javascript),所以这个类和对象的概念混淆了我。什么是

a我理解这个的好方法?


-cyktor

解决方案

从技术上讲,在JavaScript中你没有类,但只有

对象。请记住,它是一种基于原型的语言。

无论如何,JavaScript对理解类和

对象没有多大帮助。阅读一些OOP书籍。但在此之前,请自学一些程序编程。因为*有些*不够。而且,最后,

大多数时候你实际上并不需要OOP从A到B.


< blockquote>来自's的消息。 。 。


>嘿所有,

PHP是我的第一个认真的编程语言(有一些exp w /
javascript),所以这种类和对象的概念让我感到困惑。什么是让我理解这个的好方法?

-cyktor



读一本书?


-

PETER FOX自电子商务业务开始以来不一样。
PE ****** @ eminent.demon.co.uk.not.this.bit.no.html

2 Tees Close,Witham,Essex。

埃塞克斯的重力啤酒< http://www.eminent.demon.co.uk>


通过程序编程,你的意思是C?请给我一些

建议的程序语言学习。


-cyktor


Hey all,

PHP is my first serious programming language (have some exp w/
javascript), so this notion of classes and objects confuses me. What''s
a good way for me to understand this?

-cyktor

Technically speaking, in JavaScript you don''t have classes, but only
objects. Remember that it is a prototype based language.
Anyway, JavaScript won''t help you much with understanding classes and
objects. Read some OOP books. But before you do, teach yourself some
procedural programming. Because *some* ain''t enough. And, in the end,
most of the time you don''t actually need OOP to go from A to B.


Following on from ''s message. . .

>Hey all,

PHP is my first serious programming language (have some exp w/
javascript), so this notion of classes and objects confuses me. What''s
a good way for me to understand this?

-cyktor

Read a book?

--
PETER FOX Not the same since the e-commerce business came to a .
pe******@eminent.demon.co.uk.not.this.bit.no.html
2 Tees Close, Witham, Essex.
Gravity beer in Essex <http://www.eminent.demon.co.uk>


By procedural programming, do you mean C? Please give me some
suggestions for procedural languages to learn.

-cyktor


这篇关于类和对象 - 请解释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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