• 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: Matthew Johnson <email@hidden>
  • Date: Fri, 05 Apr 2002 15:23:55 +1000

"Erik M. Buck" wrote:

> 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.
>

That is something I was not aware of. And a excellent answer.

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

Thanks for the link.

>
> >
> > 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.
>

In order of learning (oldest to youngest):
FORTRAN,basic,Pascal,lisp,prolog,C++,C,X86 assembly,mc68000 assembly,Java

In order of preference:
C,C++,Java,FORTRAN,Pascal,basic,lisp,prolog,mc68000 assembly,X86 assembly

I disagree, The more languages I have under my belt the less expert I become in the lot. Maybe I am getting old and
feeble but I seem to of reached a limit in which if I learn something new I forget something old ;)

>
> 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 ?
>

I must confess that I am not a GUI programmer (the last time I did GUI work apart from motif was for windows 3.1). So I
am not a good judge of Interface design tools. i just like very much Interface builder. I was not aware it was 14 years
old.

>
> > 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 ?

Yes.

Look syntax shouldn't be a issue. And its my own time constraint issues that is my major problem. I had a very small
oportunity to bring OSX development into our site and to impress the hard core UNIX programmers that I work with of how
easy it was going to be to write code for this sucker. They were blown away with how long it took me to build a GUI with
IB (about a hour and I had never picked up IB before (thanks apple)). But both them and I hated the syntax of Obj-C. And
two weeks later I am still battling with the syntax. I guess I expected it to be miraculously easy.


>
>
> >
> > 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.
>

you'll have to prise my C compiler from my cold dead hands ;)

>
> > 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++
>

for me the "["'s suck. my kingdom for a makeObjCLikeC preprocessor ;)

I wish they made methods look like C functions. Less smalltalk more 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 didn't know they were about the same age.
C with Classes would of probably done fine.
C++ is now a monster and far from making life easier for developers it makes a damn mess.
Smalltalk is really dead.

>
> >
> > 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.
>

Java is a buggy slow toy (duck) ok that was flame bait. But I don't like Java either. Its like C++ with all the good
bits taken out. pointers rock!!!

>
> >
> > 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 hope I will get the time to appreciate it the way you obviously do :)

>
> 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.

No thanks. I have work to do.

All the languages I have learnt (see above) the most flexible/powerful I know is C. This is why Obj-C has been a bit of
a dissappointment for me. I didn't expect to have to learn the language as well the programming methodology/Classes.

Anyways I think I shall continue with Obj-C with less stress in my free time. Maybe I can give it a fairer more
considered chance.

Apologies for venting in public :)

Matt
_______________________________________________
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: "David W. Halliday" <email@hidden>
    • Re: why Obj-C
      • From: Michael Gersten <email@hidden>
    • Re: why Obj-C
      • From: "Erik M. Buck" <email@hidden>
    • Re: why Obj-C
      • From: Andy Lee <email@hidden>
References: 
 >why Obj-C (From: Matthew Johnson <email@hidden>)
 >Re: why Obj-C (From: "Erik M. Buck" <email@hidden>)

  • Prev by Date: Re: unichar question[SOLVED]
  • Next by Date: Re: why Obj-C
  • Previous by thread: Re: why Obj-C
  • Next by thread: Re: why Obj-C
  • Index(es):
    • Date
    • Thread