Sony Adopts Objective-C and GNUstep Frameworks 345
EMB Numbers writes "Sony has revealed that the new SNAP development environment for 'consumer electronics' is based on Objective-C and the open source GNUstep implementation of Apple's Openstep spec. While Apple has continued to update their specification in the form of Cocoa and Mac OS X, GNUstep has preserved the original standard. Anyone familiar with Cocoa Touch and iOS will feel right at home developing for Sony. There may even be some source code compatibility between the platforms. The world continues to chase apple — probably for the better."
Apple's response? (Score:3, Interesting)
Re:How compatitble (Score:2, Interesting)
I read this last night on Reddit, and have been chewing on it. I see this as a move to get mobile developers by piggy-backing on the Obj-C knowledge of iOS devs. Same language -- subset of API.
Re:For the better? (Score:5, Interesting)
For all the things Apple has done right and does well, clinging on to Objective-C is not one of them.
It'd be nice if you pointed out, you know, actual reasons rather than just make snide comments. I'm sure some knee-jerk Apple haters will vote you up though.
My issues with iOS development lie not with Objective-C, but with Apple's frameworks and libraries. It's frustrating to only have header files and not be able to check out what a method actually does when debugging. Fortunately, the documentation for their classes is top-notch. The objc runtime is also a pretty wild ride, but once you know your way around you can poke at it and find out where your messages are going at least. Can check out the source for the runtime here http://opensource.apple.com/source/objc4/ [apple.com]
Another issue of course, is XCode. I've switched to writing most of my iOS code in vim, building my code with the xcodebuild command. I still rely on XCode to do things like add files to the xcodeproj and manage the build configurations. XCode has a mind of its own, wacky completions, a completely fucked up undo buffer, strange locations for settings, and more frustrating joys. Would love to do away with that.
Check out the cocoa.vim plugin [vim.org], and also, while I'm at it, you can get your vim for your local environment pimped out in minutes with Vimlander 2: The quickening [github.com]. Test driving my apps with Pivotal's Cedar [github.com] framework.
C/C++/Objective-C OOP (Score:3, Interesting)
I had a difficult time moving from C++ to Objective-C. I think it would have been easier going straight from C to Objective-C. Old habits are hard to break. I thought I new OOP but it was learning Objective-C that really let it sink in.
I learned it as part of my Master's project, an iPhone application, for my graduate studies in Computer Science. I have since setup a Linux box specifically to code in Objective-C.
It really comes down to personal preference. Code in what language you like. Currently I prefer Objective-C.
NP
Re:Bizarre choice (Score:3, Interesting)
As others have mentioned in the comments, Objective-C was one of Apple's poorer decisions
I suppose you have a significantly better (simpler and more flexible) compiled OO language suitable for system-level programming up your sleeve, when you talk like that.
I like the D programming language. It's relatively new, but its well designed and multi-paradigm. It's suitable for system-level programming, but still supports higher-lever programming methods such as OO and functional programming.
Re:For the better? (Score:3, Interesting)
Yes , I agree about the syntax. Instead of creating a nice consistent extension to the C language as Bjarn did with C++ (albeit with some kludges) , Obj-C really looks like someone tossed a completely different language into C because it was easier than making an effort to actually extend C nicely, and then didn't even bother to stir the resulting dogs dinner.
The world continues to chase apple? (Score:4, Interesting)
Insinuating that SONY making use of Apple inspired development tools/specs/practices/whatever is validation of Apple in some way seems quite strange.
SONY is famous for being absolutely crap and producing/choosing/using development tools.
SONY's picking a development tool set related to Apple's only clear benefit is to people who have had to develop for SONY products in the past - ANYTHING is better than software that came out of SONY.
They sure used to make great hardware though, and that's starting to return a bit.
But adopting Apple-like dev environment(s)...? Water to a man dying of thirst and all that...
Re:Apple's response? (Score:3, Interesting)
Re:For the better? (Score:1, Interesting)
The bits that aren't C.
Load time of xib and the fact that for any non-trivial interface, you're going to end up hand-coding it anyway.
I forget, is this one of those things I agreed to an NDA on? If so would Apple kill me for telling you that despite a cleaner UI; XCode4 is just as useless?
Re:How compatitble (Score:1, Interesting)
Re:Bizarre choice (Score:4, Interesting)
Re:How compatitble (Score:4, Interesting)
If you track so closely, technically what's to stop GNUStep / LLVM being used as a platform to host and run iOS apps?
The only thing stopping this is the Cocoa (Cocoa Touch in the case of iOS) frameworks. They are analogous to the C++ STL but they are not free to use outside of an iOS device. Yes, you could still use them to create a binary and possibly run it on another device but you run the risk of a huge lawsuit if you do that. The GNUStep frameworks are coming along nicely and they can be used as an open-source alternative but you won't be able to take an app programmed using the Cocoa frameworks and simply compile it against the GNUStep frameworks without doing some re-working.
Even with that you can still make an app that uses the classes common to both the Cocoa and GNUStep frameworks and then has some platform-specific code in critical sections, then compile that app against either framework to create a binary that can run on multiple platforms. There are a few apps that do this kind of thing now and I expect that Sony's choice will greatly increase the numbers. It's a good time to be an Objective-C programmer.
Re:How compatitble (Score:3, Interesting)
If you're not a fan of "gui driven development", why are you commenting on an article about a framework for making GUIs for consumer electronics?
Consider the IDE too, C# Silverlight is better (Score:2, Interesting)
Re:For the better? (Score:4, Interesting)
I think you have that backwards. Objective-C doesn't change any of the rules of C. On the other hand there's a lot of C syntax that is not valid C++.
Both C++ and Objective-C started off as object oriented extensions to C, and IMO Objective-C does a much better job. C++ tried to add everything and the kitchen sink, and ended up with horrible, bastardized syntax because it's still trying to achieve C compatibility, even though it hasn't been strictly compatible with C in over a decade.
It's even more noticeable if you look at what's considered "good" code in each language. The following is valid C, Obj-C and C++, but a C++ weenie will whine that it's not using std::cout.
#include <stdio.h> int main() { printf("Hello world!\n"); return 0; }
Re:Bizarre choice (Score:1, Interesting)
To quote Carmack:
https://twitter.com/ID_AA_Carmack/status/28939697453
"A single use of an obj-C number formatter, and it actually shows up in profiles. Obj-C does not belong in high performance apps."
Re:How compatitble (Score:4, Interesting)
Re:Bizarre choice (Score:3, Interesting)
Claiming Objective-C is "familiar to far more programmers" is a stretch at best. I'm a C/C++ programmer, and I've been working with Java for a long while now, but I still find Objective-C's "messaging" syntax and its idiotic class definition syntax to be unintuitive and nigh-unreadable, despite the language's C-like appearance much of the time.
Seriously, what idiot decided "+" and "-" are better choices for distinguishing between class methods and instance method than using C's existing "static" keyword for one and defaulting to the other?
Re:How compatitble (Score:3, Interesting)
Funny? More like Insightful :(
Objective-C has the most unreadable and unintuitive syntax of any language I've ever worked with
What are you talking about? The example you call insightful is very readable. As for intuitiveness, I don't think any language is truly intuitive, but once you learn it, it's very easy to understand, just like any other language. I suspect you are more of a "get off my lawn" type who thinks things should be done the way you learned them and anything different is to be feared.
to say nothing of its memory management "best practices". What good do reference-counted pointers do me if I still have to manually release everything to avoid memory leaks?
renew/release isn't very difficult to understand, but if you can't keep up, Objective-C has garbage collection.
What good does its ability to mix C in with the Objective-C code do me when just mixing their two string types (NSString and char*) is a good way to make my program misbehave?
Objects != string pointers, and that's a problem for you? Seems like a fairly basic idea to grasp.
I can't help but conclude the language was built by a couple of guys saying "wouldn't it be cool if..."
You're referring to C (and that's not meant as a knock against C). Objective-C is a pretty awesome language, especially when coupled with quality frameworks like Cocoa.
I'm baffled how the summary can claim this is "probably for the better".
There is no shortage of developers who enjoy Objective-C and have had no trouble picking it up. Obj-C + Cocoa is very easy to develop with and leads to results very quickly and easily. This is a very smart move by Sony, and has potentially interesting implications for Linux in general. GNUstep is a pretty neat project.
Re:Apple's response? (Score:3, Interesting)
Did we already forget how Apple tried to ban, this year, the use of languages not blessed by them and of middleware targeting also iOS?
Re:How compatitble (Score:3, Interesting)