Sony Adopts Objective-C and GNUstep Frameworks
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."
It will be interesting to see if Apple respond to this and how. My feeling is that they might try and protect their assets and restrict developers' options. I haven't really thught this through but I just can't see Apple letting people develop apps for iPads and then recycling ostensibly the same code for some Sony gadget. It is not in their nature.
No, Cocoa is almost a superset of OpenStep (with the exception of a couple of classes like NSDataLink that Apple ditched). We (GNUstep) track the changes from Cocoa and have done for the last ten years. We also track changes from iOS. For example, we have NSRegularExpression, which is only in iOS Foundation, not yet in OS X Foundation.
I am TheRaven on Soylent News
Or more accurately, One foreign company adopts a compiler.
I want a list of atrocities done in your name - Recoil
"The world continues to chase apple -- probably for the better."
lol, did someone really just say that in the context of Objective-C? For all the things Apple has done right and does well, clinging on to Objective-C is not one of them.
GNUstep's objective is to create a free and open source implementation of the Cocoa libraries, with some additional libraries. It does not target the OpenStep spec, which is antique and obsolete.
Please read the definition
Hack your mind out of its sandbox.
Qt is LGPL, it's not "owned" by Nokia - certainly not in the way Apple controls Cocoa and GNUstep strives to keep up.
That said, as far as I am concerned GNUstep is at least the second best choice of the two / it's nice to see that their efforts might finally give something big.
One that hath name thou can not otter
So, I take it one would need two code bases?
Objective-C: All your code bases are belong to us
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.
Put identity in the browser.
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.
Ezekiel 23:20
Actually, Objective-C's performance is very very good, and verbosity is absolutely a good thing. The problems I might raise with objective-c would involve it's highly dynamic nature, and lack of a decent type system, not it's implementation's speed or it's code clarity, which are both positive advantages for it!
Cocoa is also one of the absolute cleanest application development frameworks out there by far (CocoaTouch improves on it a chunk though purely by binning a lot of old cruft), so I'd say sony made a bloody good choice.
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
Encryption: I may not agree with what you say, but I will defend your right to encrypt it...
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.
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...
Loading...
"The world continues to chase apple -- probably for the better."
When did Slashdot become a forum for apple fanboys?
C++ it like a swiss army knife with a multitude of razor-sharp blades and attachments. It can do whatever you want to do, and it can do it pretty cleverly, but if you don't know the tool really, really well, you're going to end up missing fingers :D
I did, and then you came along.
The world's burning. Moped Jesus spotted on I50. Details at 11.
I think a lot of people who dislike Objective-C are those who just looked it over and haven't spent too much time with it. I used to feel the same way until I got most of the way through an iPhone app recently. I view it as an acquired taste. Watching the great WWDC videos that Apple provides on it's development site helped me to understand it a lot and learn why they do the things they do with it.
It has been a few years since it migrated from a Linux fanboy-only site to a more democratic one. Today, you'll find Linux fanboys, Apple fanboys and surprise! Even Microsoft fanboys! But more importantly, you'll also find people impartial enough to not be fanboy to anything.
http://dilbert.com/2010-12-13
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.
Sapere aude!
The proprietary "do-whatever-you-please-with-it"-license still exists for Qt. The license is on per developer/per year-basis. Note the absence of handsets in the previous sentence. A company can do anything with the toolkit and not release anything back to the community with the proprietary license. Not that I can think of any reason to do - Qt Quick/QML seems great, and one will be able to achieve a lot easily without modifying the toolkit - which is LGPL, so your $KILLER_APP can be very much proprietary.
They aren't overrated; but they do have plenty of built-in redundancy...
Idjit! That won't compile. Try:
[codeBases allYourAreWithBelongToUs:YES];
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?
If you're *starting* a new project, D might be an option, but the GGP's assertion was that Objective-C was a mistake that Apple made.
According to Wikipedia, D first appeared in 1999, long after Apple acquired NeXT and its Objective-C based OS which was the foundation for Mac OS X. iOS is based on OSX, so it follows that they'd re-use the core parts rather than re-write it from scratch and have to maintain two distinct OS programming skillsets, if a different language didn't provide substantial benefits over staying with Obj-C.
Fingers are overrated.
I typed this faster than you did.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
Ada2005,Eiffel,Lisp (with CLOS for OO),OCaml
None of them can work with C code so directly as Objective-C, which is a very large advantage indeed for systems programming, and a decent advantage for other forms of programming too (like being able to use something like a blowfish library with almost no work).
Now that Objective-C has closures, I'm not sure I really see that great a benefit of any of those languages over the drawbacks.
If you like a LISP syntax, consider Nu which is an S-exp based variant of Objective-C and call compatible so it maintains the same benefits.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
Yes, there is a possibility for clashes if someone chooses a string which is the same as yours
Does NS stand for NeXT Software, or does it stand for Netscape?
Writing apps for a phone is a like writing 1/10 of a webpage display wise. Good coding / language doesn't matter that much. What really matters is how easy it is to get things done. I've used, C, C++, all sorts of Java, C# asp.net, but C# Silverlight is by far the best. The Visual Studio IDE is great, there is a ton of free forum support, and a lot of people are using it / (lots of sample code)
Have you ever tried to actually do something with a Swiss army knife? Or any other knife with non-fixed blades? Sure, it's possible, but a bunch of special-purpose tools beat it hands-down every time. Which, I suppose, is a pretty good metaphor for C++ :).
Forget magic. Any technology distinguishable from divine power is insufficiently advanced.
C++ is an incredibly powerful language but ObjC is also extremely capable. Cocoa (Touch) is simply the most productive framework that I have ever used. Yes, it has a pretty steep learning curve but once you get used to the Cocoa way of doing things you can produce excellent and rich GUI applications in a fraction of the time it takes in many other development environments that I've used. I work mostly in C# in my day job too...
Funny? More like Insightful :(
Objective-C has the most unreadable and unintuitive syntax of any language I've ever worked with, 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? 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?
I can't help but conclude the language was built by a couple of guys saying "wouldn't it be cool if..." without thinking about the consequences. I'm baffled how the summary can claim this is "probably for the better".
The fact that a single, rarely-used class is somewhat slow is in no way an argument against a langauge.
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?
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.
What are you talking about? The example you call insightful is very readable.
It's the brackets and the "initWithThing:x otherThing:y" paradigm that I find unintuitive and difficult to read, most especially the "let's combine the method name with the name of its first parameter!" idea. Why did they throw out perfectly understandable function call syntax in favor of surrounding everything with brackets? I know they're trying to pretend they're sending "messages", but what they ended up with is virtually identical to the standard in C except in superficial syntax.
Why did they throw out C's perfectly readable struct-definition syntax in favor of this "@interface" and "@end" and "@property" nonsense?
Why do you have to manually derive all interfaces as children of NSObject? That would be like Java requiring you to explicitly derive every class from Object. You're never not going to want your class to be derived from NSObject, so it should be assumed.
Why do they use "+" and "-" for static methods vs instance methods? Did they really think "+" and "-" were more intuitively clear than, I don't know, using the 'static' keyword that was already in the language? Is it so absurd to want method specifiers that are actually clear in their meaning?
Why did they throw out perfectly understandable pass-by-value and pass-by-address parameter passing?
None of these changes from C are for the better.
I will say that #import is an improvement over #include; I wish something similar had been adopted in C++. Still, tiny improvements like this do not offset the idiocy with which the rest of Objective-C was designed.
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.
I have used languages with widely varying syntaxes and design philosophies (I enjoyed working with Scheme, for example). I don't "fear" different ways of doing things; I do have opinions about which ways of doing things are stupid. Having a negative opinion about a specific language you like does not automatically mean I'm just shaking my bony fist in the air and shouting "get off my lawn".
Let me make myself clearer: what bothers me most about Objective-C is that it tries to pretend it's like C even while doing everything it can to be different from C without being so different that it can't have the C in its name anymore, all while retaining several of C's disadvantages and gaining very few of the advantages it claims.
renew/release isn't very difficult to understand, but if you can't keep up, Objective-C has garbage collection.
No, it's not particularly difficult to understand, but that's not my point; Objective-C's garbage collection only collects objects whose reference counts are zero. That's the whole reason you have to properly handle your reference counting. In other words, Objective-C gives you all the downsides of being forced to manage memory, combined with all the downsides of garbage collection.
(I realize garbage collection has advantages; however, by forcing you to manually handle reference counting, Objective-C negates those benefits by design. In other words, all Objective-C gains you is that instead of freeing your memory at predictable times, the garbage collector will come along at unpredictable times and slow down whatever it is your program is doing.)
Objects != string pointers, and that's a problem for you? Seems like a fairly basic idea to grasp.
It's not that, it's that nothing in Objective-C even works with char*s, other than the one init method on NSString. Want to display a char* in your UI? Hope you don't mind converting it to NSString first!
Worse, by default, string constants in your code are char*s, not NSStrings! If you want your string constant to be an NSSt
a few years ago.
These two quotes just about sum Objective-C:
"Objective-C is simple. It just takes a genius to understand its simplicity"
and:
"Those who don't understand Objective-C are condemned to reinvent it, poorly"
With apologies to Dennis Ritchie, Henry Spencer and Unix.
I agree with some of your points (and don't much like Obj-C as a language), but others are incorrect.
Why do you have to manually derive all interfaces as children of NSObject? That would be like Java requiring you to explicitly derive every class from Object. You're never not going to want your class to be derived from NSObject, so it should be assumed.
You're only going to derive from NSObject when you're writing for Cocoa; it's not a magic base root class that's inherent to the language like java.lang.Object is in Java. It is perfectly possible to use Obj-C with something other than Cocoa, and then you'd have your own root class different from NSObject.
more intuitively clear than, I don't know, using the 'static' keyword that was already in the language? Is it so absurd to want method specifiers that are actually clear in their meaning?
There's actually nothing particularly clear about the use of "static" modifier to mean class methods. That C++ made a mistake of doing that once in the past, also inventing the misnomer "static method" in the process, which has stuck since then, is a rather poor excuse. Back when Obj-C was designed, anyway, it was not anywhere as widespread as it is today.
I agree that the use of "+" and "-" rather than keywords is silly, though.
Why did they throw out perfectly understandable pass-by-value and pass-by-address parameter passing?
Huh? There's no such thing in C. All parameters are passed by value. Sure, you can pass an address of something (i.e. a pointer) by value. And hey, you can also do that in Obj-C!
Objective-C's garbage collection only collects objects whose reference counts are zero. That's the whole reason you have to properly handle your reference counting.
That is plainly not true. In fact, when you have tracing GC enabled in Objective-C, it doesn't even do reference counting on objects - any explicit "release" and "retain" messages will not even reach them. You do not need to "properly handle your reference counting" etc.
The only annoyance at the moment is that GC is not available on iOS.
It's not that, it's that nothing in Objective-C even works with char*s, other than the one init method on NSString. Want to display a char* in your UI? Hope you don't mind converting it to NSString first!
Not any different from std::string or QString, then.
At the very least, they should have made the language automatically convert char*s to NSStrings, and vice versa, where necessary!
Well, that's a bit tricky in practice.
Implicit conversion from NSString to char* is unsafe because you don't know how that char* would be used. What if someone tries to write to it as if it's a buffer? If you give them pointer to internal NSString storage directly, then you can end up with an object in an inconsistent state pretty easily. If you allocate new storage and copy it over, then 1) it's quite expensive for an implicit operation, and 2) who's going to free it, and how do they know they need to?
An implicit conversion from char* to NSString has the same problem of object ownership, but that is moot when GC is there.
you should know that trying to handle primitive data types and objects in the same way is a big no-no.
One could argue that string should be a primitive data type.
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.
Yes. It's called C++. Which is significantly better than ObjC, and almost as simple and flexible.
And before you say anything, consider the fact that BeOS was largely programmed in C++. If the most flexible, fastest and most responsive multimedia operating system ever produced is not a testament to C++'s power, I don't know what it is.
You could argue that but considering that no language remotely related to C has string as a primitive, you'd be very alone. For the most part, true primitives are only included in a few languages. Smalltalk which most OOP languages are derived considers primitives as objects. Java is one of the few languages that has true primitives, and not even Java has string as a primitive. Strings are objects in Java. The most serious problem with strings as primitives is that strings do not have a fixed size. True primitives have fixed sizes.
Well, there's spam egg sausage and spam, that's not got much spam in it.