• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: why Obj-C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: why Obj-C


  • Subject: Re: why Obj-C
  • From: "Erik M. Buck" <email@hidden>
  • Date: Thu, 4 Apr 2002 22:26:22 -0600
  • Organization: EMB & Assocites Inc.

From: "Matthew Johnson" <email@hidden>
> Why did apple choose Obj-C over something people know and understand like
C++? or even C.

1) Because Openstep and its predecessor was written in Objective-C almost 15
years ago. Cocoa is Openstep 5.0. Do you remember what C++ was like 15
years ago. The "virtual" key word had just been introduced.

2) Read the section on "Why Objective-C" in
http://www.toodarkpark.org/computers/objc/objctoc.html


>
> Why are we forced to learn yet another syntax that is very alien to
C++/Java. I absolutely love the interface builder its

How many languages do you know ? I say the more the better.

You love Interface Builder but not Objective-C ? Why do you suppose tools
like Interface Builder are not available for other platforms/languages ? It
is Objective-C that makes it possible. To make it with C++, you would have
to write an Objective-C like runtime in C++. Isn't it interesting that IB
is almost 14 years old, and it has not changed much in that time ?

> just excellent. But then you have to write the meat of the program and its
been not a very pleasent experience for a
> newbie to mac but I experienced C/C++ dude.

Are you that hung up on syntax or were you unable to grasp the dynamic
nature of Objective-C ?

>
> Writing for the Mac for the first time (I am a solaris programmer (C/C++))
I thought I would try cocoa to write a one
> off application for my company. Personally I have found this was a very
large mistake. If I every have to write another

To each his own. Cocoa is partly an aesthetic choice. Many people
including me find Cocoa vastly more productive than alternatives.

> one off Mac application I think it will be in Carbon.
>
> Can someone tell me what is it about Obj-C that makes the syntax for
class's and methods have to look like it does? why
> "[" instead of "(".

1) Because Objective-C mixes Smalltalk and C
2) Because Brad Cox liked []
3) Because () is already overused and can be confused for a function call.
Messages are very different from function calls.
4) Because () is ambiguous in some cases even in C++

>
> I will never understand the IT worlds obsession with reinventing the
wheel.

In this case, Objective-C and C++ are about the same age. Some would argue
that Objective-C came first and C++ is the new guy considering that in the
early days C++ was "C with classes" and did not support polymorphism
(considered essential for an OO language). Furthermore Objective-C works
like Smalltalk (the original OO language for which the term "Object
Oriented" was coined.

>
> I wish people would understand that the power of Java is not Java syntax
but its the collection of Standard classes Sun
> could of done the same thing with C/C++ or Perl or Pascal etc. Same with
Obj-C.

And Cocoa makes the Java standard libraries look like buggy slow toys in
comparison and for some application domains. The main reason to use
Objective-C is to be able to use Cocoa and to be able to use the language
features that make Cocoa possible.

>
> I think I might go have a lay down.

If you ever understand Cocoa, I assure you that it will change your life.
Even you future C++ code will look and work differently.

I recommend that you learn Lisp, Smalltalk, Eiffel, Perl, and at least one
assembly language. Broaden your horizons. Then come back and look at C
derived languages with a different admiration and sense of limitations.
_______________________________________________
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.

  • Follow-Ups:
    • Re: why Obj-C
      • From: Matthew Johnson <email@hidden>
References: 
 >why Obj-C (From: Matthew Johnson <email@hidden>)

  • Prev by Date: Just starting out?
  • Next by Date: Re: why Obj-C
  • Previous by thread: why Obj-C
  • Next by thread: Re: why Obj-C
  • Index(es):
    • Date
    • Thread