1.

Which Of These Is A Difference Between C++ And Perl?

Answer»

Perl can have objects whose data cannot be accessed outside its class, but C++ cannot.
Perl can use closures with unreachable PRIVATE data as objects, and C++ doesn't SUPPORT closures. Furthermore, C++ does support pointer arithmetic via `int *ip = (int*)&object', allowing you do look all over the object. Perl doesn't have pointer arithmetic. It also doesn't allow `#define private PUBLIC' to change access rights to foreign objects. On the other HAND, once you start POKING around in /dev/mem, no one is safe.

Perl can have objects whose data cannot be accessed outside its class, but C++ cannot.
Perl can use closures with unreachable private data as objects, and C++ doesn't support closures. Furthermore, C++ does support pointer arithmetic via `int *ip = (int*)&object', allowing you do look all over the object. Perl doesn't have pointer arithmetic. It also doesn't allow `#define private public' to change access rights to foreign objects. On the other hand, once you start poking around in /dev/mem, no one is safe.



Discussion

No Comment Found