Re: Objective-C Question
Re: Objective-C Question
- Subject: Re: Objective-C Question
- From: Greg Titus <email@hidden>
- Date: Mon, 22 Sep 2003 12:30:01 -0700
I kinda hate to get into this, but I feel like I need to correct some
misapprehensions.
On Sep 22, 2003, at 11:25 AM, Steve Ehrenfried wrote:
--- email@hidden wrote:
This "feature" provides no value. Why don't you
just call the class
"AbstractWhatever" - that communicates the idea just
as weel.
You're ignorant. As explained by another poster, Obj
C actually supports this "no value feature" (partial
implementation). Do you even know what you're arguing
about????
Well, Objective-C supports this _situation_, but there is no language
construct for abstract classes, the way there is in Java / C++. There
is no need. Like Marcel said as well, I've never accidently
instantiated an abstract class. Whether a class is abstract or not is
and should be just a documentation question. There is no need to have a
language construct for it. And that's what Todd is trying to say here.
There is no value to the language construct that can not be equally
expressed by a simple naming convention - i.e. a form of documentation.
NSDURING not working for you?
As I already mentioned, I'm new to the language. I
thought this list was supposed to be helpful.
I agree that the tone of Todd's post was really out of line, by the
way, though I understand his frustration. :-)
What makes you think you know better than I what
members should and
shouldn't be callable? There are conventions for
specifying private
members - name them with a leading underscore and
leave them out of the
header file (define them in a private category in
the implementation
file). Otherwise they're public. Its not a
problem. The C++ and
J-heads are paranoid control freaks.
You're talking about something else. I asked about
DATA encapsulation, and yes Obj C supports it.
Pretty useless Obj-C feature that isn't necessary - I agree with Marcel
there too.
We use naming conventions - it amounts to the same
thing - longer names
to be distinct. NSString is in the namespace NS -
get it?
It's more than just naming conventions, which only
work if everyone follows them.
Namespaces only work if everyone follows them. Abstract classes only
work if everyone subclasses them. Data encapsulation only works if you
don't cast your object pointer and access the bytes directly.
Conventions, design patterns, style are all part of what real
programmers do. Many language comparisons seem to forget this and only
concentrate on the language constructs themselves, forgetting that
there is a whole layer of using a programming language outside of what
keywords the compiler understands. You can sometimes accomplish the
same thing with less bother, less overhead, less code with a simple
comment or naming convention.
My point is this:
Every object-oriented benefit of programming only works if you follow
the paradigm. The main difference between Objective-C and C++ is that
C++ tries to enforce as much as possible with a large language, while
Objective-C tries to support the paradigms with the minimum number of
language constructs and leaves as much as possible to convention. The
sad part of Java is that they started with a fairly decent language and
they are borrowing more and more baggage from C++ as time goes on, to
the detriment of the quite nice core.
All I can is UNBELIEVABLE! I asked some simple
questions, not even meaning it as a slam against the
language and stating that I don't yet know everything
about Obj C, and I get attacked. There's an awful lot
of narrow mindedness, condescension and arrogance on
this list (I'm not referring to the people who were
actually helpful). Of course, this also explains why
Obj C and Cocoa is a "we know best" cult and will
continue to be for some time. Too bad. Some people
feel the need to get religious about things they
partially understand; an intelligent person can look
at things from multiple points of view without getting
defensive. Later.
I think describing this list as narrow minded and arrogant is painting
with a broad brush. Yes, Todd's responses have been over the top, but
one poster is not the whole...
-Greg
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.