Stanford Offers Cocoa Class
An anonymous reader writes "Back in the early 90's Stanford University offered a class on Objective-C for students interested in writing applications for NeXTSTEP. After a long hiatus it appears that class will be offered again as CS193E, 'Object-oriented User Interface Programming.' It will be covering the Apple development tools, Objective-C, Foundation and AppKit, and Quartz. Any other schools out there planning or already offering Objective-C courses?"
It seems strange that Objective-C has failed to attract the popularity of C++, given that it seems (to me at least) by far the more elegant of the two. It implements object-oriented programming in a much cleaner way than C++, and still loses none of the power of C. What Java should have been, really
((lambda x ((x))) (lambda x ((x))))
Would it not be better to teach the students HOW to program well
There is. It's called the rest of the CS program at the school. They teach OOP-concepts, algorithms, etc.
This class is more specific. And optional. No one is forced to take it. And Cocoa isn't a language, its a set of API's. It just happens to use Objective-C. With macs being such a minority in schools, I don't see why its a problem to have an optional (probably student-run) class to each people how to develop for the mac.
This class is in the Stanford CS193 series, which consists of lighter workload classes often taken by students outside the CS department, and geared for specific technologies. I don't believe CS majors get much credit for taking these classes. The core CS classes at Stanford are much less focused on details of specific languages (although Java is featured in the main intro OOP class; I guess you have to pick something).
.NET, Microsoft MFC, and Java, so a class in Cocoa is not too surprising.
Stanford has offered classes in
UC Berkeley has already had a handful of Cocoa and mac development courses, most taught by my roommate. These courses, though student run, earned real CS credits and had labs, projects, etc. He just graduated, so someone else will have to take up the torch. And it won't be me.
Personally, I think its a great idea. Many, many students get out of CS schools with vague notions of how to write a compiler in LISP, or what the best way to implement XYZ (without understanding why it SHOULD be implemented). As if anyone cares. Macs may be a small market, but a Cocoa class is teaching a useful, marketable skill that can be directly applied to real-world application development.
Following the schema of all Stanford CS courses, it will soon be at: /class/cs193e/
Since it already has a "Under construction...", the professor's assistant is probably already busy preparing the page.
>> Had I been going to bed earlier every night? Have I been sleeping later? Has Tyler been in charge longer and l
IANAOCP (I Am Not An Objective C Programmer), but from my limited experience, Objective-C and C++ went in pretty much completely opposite directions in how they decided to add object-orientation to C.
In C++, everything is statically typed, and performance is a primary goal. Objective C has more overhead, but is much more dynamic. Some cool Objective-C features (note: in Objective-C parlance, "message passing" is basically method invocation):
- Very weak typing. If you want to, you can just pass around all your objects as variables of the built-in type "id", and this allows you to send any message to any object without casting, and of course to build container classes that hold any object. If you want some more typing help from the compiler, you can use typed pointer variables to reference objects, in which case it'll warn you about passing messages that the class doesn't implement.
- Message forwarding. I've always loved this feature in languages that have it. Makes it so easy to create delegating objects -- you can implement a single "catch-all" type method that allows you to forward any unsupported messages someone passes to your object on to another object.
- Categories/mix-ins. Add functionality to existing classes without having to extend them. The functionality is automatically given to all instances of the class the program creates.
- Sending messages to nil (null). Rather than throwing an exception when you try to send a message to a nil reference, Objective-C just returns nil back. Sounds weird, but this actually saves a lot of nil checks in practice.
- Introspection, which others have mentioned. Facilities to figure out what messages an object or type can respond to, to create new instances given the type name, to send messages based on the method name, etc.
- Methods as first-class objects. You can elegantly pass around method pointers, and the Cocoa frameworks take advantage of this for GUI callbacks and such. If you're familiar with C# and Java, Objective-C is similar to to C# in this respect, and I much prefer these sorts of method callbacks to Java's system of creating (usually anonymous) listener classes.
There are a lot of other advanced late-binding things you can do in Objective C too. I have some complains with the language (it's a little too verbose for my tastes, for one), but overall it seems like a great language for building dynamic systems and GUIs.