Slashdot Mirror


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

67 of 345 comments (clear)

  1. Apple's response? by symes · · Score: 2, Interesting

    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.

    1. Re:Apple's response? by Bill_the_Engineer · · Score: 2, Interesting

      Well actually they do, but they wanted it "open". Apple also owns the rights to Obj-C and they still support its inclusion in gcc.

      --
      These comments are my own and do not necessarily reflect the views or opinions of my employer or colleagues...
    2. Re:Apple's response? by DrXym · · Score: 2, Insightful
      This is more or less their philosophy. Look at their attempts to squash scripting languages, runtimes & browsers on iOS. There is absolutely zero technical reason for this, it's all to force developers to code to Apple's APIs. The last thing they want is for apps to become heterogenous so they do everything in their power to prevent that happening starting with making devs choose which platform to sink their efforts into.

      Superficially this is a good strategy but things can easily swing the other way. After all Android is here and takes virtually the opposite approach. It's quite likely in a few years that Apple will be playing second banana to Android and it will be they who are waiting for apps to get ported.

    3. Re:Apple's response? by benbean · · Score: 3, Insightful

      There is absolutely zero technical reason for this, it's all to force developers to code to Apple's APIs.

      One technical reason for this is to make sure that everybody is on the same playing field when it comes to things like architecture changes.

      If you know anything about Apple history, they have been able to make successful transitions between chipsets on more than one occasion. By requiring everybody to use the same development tools, any significant architecture changes are just a recompile away in an updated Xcode.

      Just one of several reasons, along with UI consistency and performance amongst others, but one of the most important.

      --
      It's a Unix system - I know this.
    4. Re:Apple's response? by codegen · · Score: 2, Informative

      Apple also owns the rights to Obj-C

      ???? Obj-C was created by Brad Cox in the early 80s. Next licensed the trademark from StepStone. GCC has had an objective C compiler in it (as described by Cox) since the early 90s. As it is, the compiler used by Apple is the GCC compiler with some extra features such as properties (which have been released as gpl and are available for download from apples website). With the exception of trademarks and patents on an implementation, you can't own a language. Anyone can build a compiler for the same language with a different name (with exception of patented parts of implementation which is less certain with Bilski).

      --
      Atlas stands on the earth and carries the celestial sphere on his shoulders.
    5. Re:Apple's response? by sznupi · · Score: 2, 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?

      --
      One that hath name thou can not otter
  2. Re:How compatitble by TheRaven64 · · Score: 5, Informative

    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
  3. Who does what? by clickclickdrone · · Score: 4, Insightful

    The world continues to chase apple -- probably for the better

    Or more accurately, One foreign company adopts a compiler.

    --
    I want a list of atrocities done in your name - Recoil
  4. For the better? by Xest · · Score: 2, Insightful

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

    1. Re:For the better? by WrongSizeGlass · · Score: 2, Insightful

      Indeed. I've worked with Objective-C on and off since the pre-OS X 'Rhapsody' days. It's almost like a cruel mix of coding, texting and writing documentation ... all that plus a touch of COBOL's verbosity with a syntax/grammar nazi in its heart. After a while you just want to look a blank screen.

    2. Re:For the better? by thenextstevejobs · · Score: 4, 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/

      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, 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. Test driving my apps with Pivotal's Cedar framework.

      --
      Long live the BSD license
    3. Re:For the better? by lurch_mojoff · · Score: 4, Informative

      Some of the biggest NeXT clients were precisely from the military, intelligence, banking, financial services and science communities. And they chose NeXT precisely because of Objective-C and NeXTStep.

    4. Re:For the better? by nicholas22 · · Score: 2, Informative

      "The world continues to chase apple -- probably for the better." That's just flame bait, I wouldn't have glimpsed twice on this article had there been no such phrase... Yet, here I am now, reading the article, posting and trying to come up with something that will tease Apple fanbois, for the heck of it. This is why I come here every day ;)

    5. Re:For the better? by barzok · · Score: 2, Insightful

      Just because something is popular & widespread, doesn't mean it's high-quality.

      And just because something is not widespread, does not mean that it isn't high-quality.

    6. Re:For the better? by Xest · · Score: 3, Insightful

      To be fair it's not that there's any inherent problem with Objective-C, that much is pretty well demonstrated by the countless great applications built on it for Apple's platforms. The real issue is really that it's like the neanderthal of languages- it evolved from C in parallel with languages like C++ and Java, but in doing so has ended up rather more ugly, and whilst it has some good bits, it also has bad bits like a lack of namespaces and operator overloading (although of course these issues aren't limited to Objective-C, Java lacks operator overloading too for example) but the combination of what is frankly a quite horrible syntax and these missing features means it's essentially just a poor man's C++. The obscurity of the syntax just builds an extra barrier that's really unnecessary in this day and age- every developer just about is comfortable with C++ style syntax so why waste time with a language syntax that's so obscure when you can just have one that people can jump straight into? This issue spills over into cross platform development somewhat in that it's much more of a headache to development multiple versions of a program when you're facing two very different sets of syntax more so than porting between programs with similar syntax.

      So yeah, certainly it "works", but there's really just no point in it when other languages work just as well without the added headache of lack of things like namespaces and an obscure syntax. There are bigger issues with the development tools and libraries themselves, but really that's something else, my comment was really targetted at the language- effectively Objective-C is different without bringing anything worthwhile to the table- at least with some other languages that have more obscure syntax they also often have a redeeming feature, like say being a functional programming language for example.

    7. Re:For the better? by Viol8 · · Score: 2, 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.

    8. Re:For the better? by Graff · · Score: 5, Informative

      Also doesn't it's dynamic runtime stuff allow certain things that C++ doesn't?

      Yeah, like built-in introspection and reflextion. Stuff like RPC (remote procedure calls) is simple and flexible under Objective-C but under C++ it has to be hard-coded in and can be very brittle.

    9. Re:For the better? by dyfet · · Score: 2, Insightful

      While your overall statement could be thought of as broadly correct and relevant, it does so by being a chimeric language where you have two completely different and unrelated syntactic forms (C and smalltalk) that are superimposed on each other. I personally feel this reduces overall legibility.

      Another consideration is that since method calls are messages with signatures that are symbolically matched at runtime as each method is invoked, there is some runtime overhead in method calls that are very different than found in C++ methods, even in respect to C++ virtuals, and this may become very important depending on how methods are used. To me Objective-C tends to make you use smalltalk as the framework for "overall" application structure and then use pure C for the details, where C++ is better for applying object oriented methods even to low level details, and this is where execution speed often does matter.

      Finally Objective-C's runtime library standardized threads and conditionals, which makes writing multi-threaded applications more consistent and even generically cross-platform. However, all the issues with using pure C functions and libraries that are not re-entrant do of course remain.

    10. Re:For the better? by teh+kurisu · · Score: 3, Insightful

      I think the extent to which the syntax is a barrier to entry for new developers is exaggerated. Square brackets denote method calls - easy. It might take a wee while before typing out method declarations in the right order is second nature, but I think that's acceptable because you gain (forced) named parameters.

      I like the fact that the syntax is different, because the chances of getting caught out are reduced. There are already too many languages with similar but subtly different syntaxes out there.

    11. Re:For the better? by Arker · · Score: 3, Insightful

      essentially just a poor man's C++.

      Actually, it's the other way around, C++ is the poor mans objC. Unlike C++ it's a C superset, and way back with NeXT it was demonstrably leading to fewer bugs and less developer time on the same job. Apple has made some poor decisions in its role as de facto shepherd but the language is solid in its role.

      --
      =-=-=-=-=-=-=-=-=-=-=-=-=-=-
      Friends don't let friends enable ecmascript.
    12. Re:For the better? by Graff · · Score: 3, Informative

      Nice link on Reflection, every now and then I wish I could do that but didn't know I could.

      There's a lot more to it if you dig deeper:
      Objective-C Runtime Programming Guide

      You can do some pretty neat stuff like dynamically creating a class and adding methods to it. Some of it should only be used as a last resort but it's nice having the tools at hand if you really need them. This kind of stuff is either extremely difficult or outright impossible in C++.

      Yes, there are some performance penalties to a dynamic runtime but for most cases it is negligible. If you desire you can circumvent the dynamic aspect of Objective-C and "freeze" method calls in order to get around those penalties for performance-critical code. There's a great series of articles on this subject: The Optimizing Objective C Series

    13. Re:For the better? by muecksteiner · · Score: 3, Informative

      You apparently do not really understand what Objective-C is about yet. Yeah, I know, "you don't know what you are talking about" is the classical ad hominem attack in any programming language flamewar. But in my opinion, it is hard to see how anyone who has actually taken the time to look at Objective-C closely could ever refer to it as being a "poor man's C++".

      Now calling it a "poor man's Smalltalk", well, you might have a point there. But C++? ObjC and C++ are both in some way descended from C, but that is where the conceptual similarities end. The ObjC runtime is dynamic, which is IMHO a blessing, compared to the strict typing and template system of C++. But I'll grant you any day that Obj-C could do with some modernisation, in particular w/r to namespaces.

      But even the other thing you mention, operator overloading... that is absent for a reason, simply because software design works differently in ObjC. You don't really need it in the same way that you do with C++. Same with multiple inheritance. You have protocols for that, amongst other things.

      So please give ObjC another, more in-depth look, some time. You might be surprised in a positive way, once you look past the admittedly rather weird syntax.

      A.

    14. Re:For the better? by onefriedrice · · Score: 5, Insightful

      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.

      I laughed at this post, but then I realized you might not be trying to be funny. As a C++ programmer myself, I've never heard anyone referring to C++ in a serious way as a "nice consistent extension to the C language." C++ is an absolute monster. It's completely inconsistent in many ways and is riddled with so many "gotchas" that it takes years until you should be able to call yourself an expert. That's a long time in the context of learning a new way to describe what a computer should do.

      I haven't programmed in Objective-C in years, but I do remember that it is far simpler to learn than C++. It adds comparatively little to the C language, as far as syntax goes; basically just the [] message-passing construct and the @ keywords. I think Objective-C "2.0" may have distinguished itself a little more, but I haven't looked into it.

      Anyway, hopefully you're being funny. Otherwise, we have completely different opinions. Objective-C seems to have extended C in a way that is much nicer and cleaner than C++ IMO.

      --
      This author takes full ownership and responsibility for the unpopular opinions outlined above.
    15. Re:For the better? by UnknownSoldier · · Score: 3, Informative

      You CAN do reflection in C++ as the code base for one game I saw ... the catch is you need a super-base object, templates, and macros to pull it all off ...

      but yeah, there is no _native_ language support for it.

    16. Re:For the better? by Graff · · Score: 3, Informative

      But I'll grant you any day that Obj-C could do with some modernisation, in particular w/r to namespaces.

      In the end namespaces are very little more than appending more characters on a name. You can get most of what namespaces do just by adding a unique string to part of your class name. Yes, there is a possibility for clashes if someone chooses a string which is the same as yours but how often do people use outside classes other than the ones in the Cocoa frameworks?

      At best there should be some sort of prefix directory where developers can register their class prefixes and make sure that they have a unique string. Apple already uses NS and CF so most developers know do avoid using them.

      Here's some good reading on the topic:
      Cocoa Style for Objective-C: Part I
      ChooseYourOwnPrefix

    17. Re:For the better? by Xest · · Score: 4, Insightful

      But that's a completely different argument, his point is that C++ extends the C syntax and rules pretty consistently, whilst Objective-C does not, it changes them.

      The complexity of C++ stems not from the syntax per-se, but simply because you can do that much more with it- not only have you got namespaces for better code organisation in large projects, not only have you got tools such as operator overloading, true multiple inheritance, but you also have options such as template meta-programming.

      You found C++ harder simply because it has more features, and more complex features to learn, not because of it's syntax. C++'s complexity stems purely from it's power, Objective-C's complexity stems from it's obscure syntax- the former is the price you pay for extra features, the latter is just simply inexcusable difference for the sake of difference and/or poor language design.

      C++'s syntax change complexity is purely down to the amount of syntax that is required to implement such a rich set of features. If you base your argument purely on syntax without any consideration of why that additional syntax is there and without any consideration of language changes then you might as well just argue Java trumps them both because it's much closer to C syntactically than either of them, but that would be ignorant of the fact Java offers a completely different featureset again.

      Perhaps the most obvious test though is this, write an application that's not overly complex and uses the base set of shared features the languages provide using their preferred syntax (rather than the fact you can just use C for either) and which then more closely represents a C program syntactically? you really can't argue it's anything other than C++, which is precisely why the jump to C++ is much more natural than to Objective-C as per the GP's argument.

    18. Re:For the better? by Anonymous Coward · · 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; }

  5. Summary is incorrect by zr-rifle · · Score: 4, Informative

    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.
    1. Re:Summary is incorrect by rxmd · · Score: 2, Informative

      Apple has always been one of the driving forces behind Unicode.

      For selected values of "always". Apple has supported Unicode well since OS X, that is since 2001 or so, or in other words, ten years after the Unicode standard was published. Even Windows was earlier - Unicode support in Windows NT 3.x was there on the API level, in NT 4 it would work well if your programmers had been halfway diligent, and in Windows 2000 it would work well out of the box. With Apple systems before 2001, it was a pain to get Unicode working properly on MacOS 9 - it was technically supported in 9.x, but it didn't really work all that well.

      With OS X, Apple finally had the opportunity (that Plan 9 had had something like a decade earlier) to design a new API that used Unicode for all strings. Prior to OS X, the Apple device that supported Unicode best was the Newton, and even there you didn't have proper input methods and rather limited font support.

      --
      As a state gets corrupt, its laws multiply; the most corrupt states have the most numerous laws. (Tacitus, Annales 3:27)
  6. Re:Bizarre choice by sznupi · · Score: 4, Insightful

    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
  7. Re:How compatitble by WrongSizeGlass · · Score: 2, Funny

    So, I take it one would need two code bases?

    Objective-C: All your code bases are belong to us

  8. Re:How compatitble by Daengbo · · 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.

  9. Re:Bizarre choice by K.+S.+Kyosuke · · Score: 3, Insightful

    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
  10. Re:Bizarre choice by beelsebob · · Score: 5, Insightful

    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.

  11. C/C++/Objective-C OOP by mrnick · · Score: 2, 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

    --

    Encryption: I may not agree with what you say, but I will defend your right to encrypt it...
    1. Re:C/C++/Objective-C OOP by quacking+duck · · Score: 2, Funny

      I thought I gnu OOP but it was learning Objective-C that really let it sink in.

      So I take it you didn't gno OOP?

      Fixed that for both of you.

  12. Re:Bizarre choice by onionman · · Score: 2, 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.

  13. The world continues to chase apple? by Assmasher · · Score: 3, 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...

    --
    Loading...
  14. "The world continues to chase apple -- probably fo by Charliemopps · · Score: 3, Insightful

    "The world continues to chase apple -- probably for the better."

    When did Slashdot become a forum for apple fanboys?

  15. Re:How compatitble by kohaku · · Score: 3, Insightful

    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

  16. Re:nice! by MightyMartian · · Score: 2, Funny

    I did, and then you came along.

    --
    The world's burning. Moped Jesus spotted on I50. Details at 11.
  17. Re:Bizarre choice by forsey · · Score: 3, Interesting

    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.

  18. Re:"The world continues to chase apple -- probably by hrimhari · · Score: 3, Insightful

    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
  19. Re:How compatitble by Graff · · Score: 3, 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.

  20. Re:Bizarre choice by marsu_k · · Score: 2, Informative

    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.

  21. Re:How compatitble by fuzzyfuzzyfungus · · Score: 2, Funny

    They aren't overrated; but they do have plenty of built-in redundancy...

  22. Re:How compatitble by jo42 · · Score: 2, Funny

    Idjit! That won't compile. Try:

    [codeBases allYourAreWithBelongToUs:YES];

  23. Re:How compatitble by 644bd346996 · · 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?

  24. Re:Bizarre choice by quacking+duck · · Score: 2, Informative

    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.

  25. Re:How compatitble by SuperKendall · · Score: 2, Funny

    Fingers are overrated.

    I typed this faster than you did.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  26. Huge disadvantage for system programming by SuperKendall · · Score: 2, Informative

    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
  27. Netscape by tepples · · Score: 2, Insightful

    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?

    1. Re:Netscape by PhunkySchtuff · · Score: 2, Informative

      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?

      Neither - it stands for NeXTSTEP

  28. Consider the IDE too, C# Silverlight is better by danparker276 · · Score: 2, Interesting

    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)

  29. Re:How compatitble by ultranova · · Score: 4, Insightful

    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.

  30. Re:How compatitble by iJed · · Score: 3, Interesting

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

  31. Re:How compatitble by HeronBlademaster · · Score: 2, Insightful

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

  32. Re:Bizarre choice by Anonymous Coward · · Score: 3, Insightful

    The fact that a single, rarely-used class is somewhat slow is in no way an argument against a langauge.

  33. Re:Bizarre choice by HeronBlademaster · · Score: 2, 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?

  34. Re:How compatitble by node+3 · · Score: 2, 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.

  35. Re:How compatitble by HeronBlademaster · · Score: 5, Informative

    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

  36. Re:"The world continues to chase apple -- probably by goosesensor · · Score: 2, Informative

    a few years ago.

  37. Objective-C in a nutshell by Coward+Anonymous · · Score: 3, Funny

    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.

  38. Re:How compatitble by shutdown+-p+now · · Score: 2, Informative

    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.

  39. Re:How compatitble by HeronBlademaster · · Score: 2, Insightful

    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.

  40. Re:Bizarre choice by master_p · · Score: 2, Insightful

    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.

  41. Re:How compatitble by UnknowingFool · · Score: 2, Interesting

    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.