....What u've said and u strongly would like some others one to be like u told,though
it would make some painful,not only who has listened,but you also feel not as much good as u ever thought.it's could be said that u should keep on with ur confidence what u'd like another one to be.......
During this time,coding on PHP is just my major task,but it seems ok whatever language I use somehow I'm keeping on.
วันจันทร์, ตุลาคม 10, 2548
Quick Comparative Study
These cousin languages bear a strong resemblance as well as clearly distinctive traits:
These cousin languages bear a strong resemblance as well as clearly distinctive traits:
C++ | PHP | |
Class | Class MyClass : public BaseClass {} | class Class MyClass extends BaseClass {} |
Inheritance | Multiple | Simple |
Constructor | MyClass() {} | function MyClass() {} |
Destructor | ˜MyClass() {} | None |
Parameter Passing | By value but widespread use of pointers make it equivalent to references (references are also supported). | Passing objects by value by default has been making PHP the odd language out. PHP 5 will bring it in line with other object languages. |
-> operator | Pointer to class or struct member. | Access to class member (would be "dot" in many languages, but dot is already string concatenation operator). Pointers are absent in PHP. |
f()->g() calls | Can be arbitrarily nested. | Will be supported by PHP 5. Until then use saved returned value (a two-steps process) $r=&f(); // step 1 $r->g(); // step 2 |
Type system | Statically typed. | Dynamically typed. |
Strings | Not a native type (ASCIIZ). | Natively supported. |
Arrays | Static | Dynamic— - Associative |
Garbage collector | None, ; manage memory the hard way. | All system resources are garbage garbage-collected. |
Preprocessor | Very elaborate. | Absent—define() supported. |
Language level | L3G with L4G-like libraries. | L4G, sometimes strongly reminiscent of L3G. |
สมัครสมาชิก:
บทความ (Atom)