Thread View: comp.lang.objective-c
1 messages
1 total messages
Started by Daniel A. Burkhard
Fri, 22 Feb 1991 01:06
Re: Objective C vs C++
Author: Daniel A. Burkhard
Date: Fri, 22 Feb 1991 01:06
Date: Fri, 22 Feb 1991 01:06
58 lines
2377 bytes
2377 bytes
In article <44957@nigel.ee.udel.edu>, carroll@cis.udel.edu (Mark Carroll) writes:
> ... stuff deleted
> C++ is a systems language. It's very low level, very fast, etc. It's
> optimized towards very low level programming. It's not very good
> at abstraction. It's completely impossible to implement a class in
> a way where a user cannot change the private parts of the class, or
> alter the class declaration. ............
How so ?? C++ gives you member access control private (default), public, and
protected. A user has no direct access to private members, i.e private
members can only be changed thru the public interface of a class.
[ Of course these rules can always be violated in any language that supports
access to raw memory ...]
> C++ is almost completely statically bound;
> dynamic binding only comes into play when you start using virtual
> function, and only functions tagged virtual can be rewritten in your
> subclasses.
I'm not exactely sure what you mean by "rewritten", but of course something like
class foo
{
int a;
public:
foo(int aa=1) { a = aa;}
int geta() { return a;}
};
class bar: public foo
{
int b;
public:
bar(int bb=2) { b =bb; }
int geta() { return b;}
};
is perfectly legal in C++ [note: no "virtual" here].
> .. stuff deleted
> ..................... Also, in
> C++, it is possible to distribute object-code for classes, without the
> corresponding source. You can present objects which the user can make
> full use of, but cannot alter without implementing a subclass. The private
> parts of one of these classes can NEVER be changed by their users.
This seems to be a contradiction to your first point.
-- dan
-------------------------------------------------------------------------------
Dan A. Burkhard Internet: dxb@genrad.com
GenRad, Inc UUCP: ...!genrad!animal!dxb
300 Baker Ave Phone: (508) 369-4400 X3304
Concord, MA 01742
------------------------------------------------------------------------------
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads