Slashdot Mirror


Objective-C Comes of Age

New submitter IdleThoughts writes "Sometimes it takes a long time to spark a revolution. Long the ugly duckling of programming languages, iOS' Objective-C passed C# in the 'TIOBE Programming Community Index this month and seems on a trajectory to overtake C++ in the next few. It was invented in the early 1980s by Brad Cox and Tom Love, with the idea of creating 'Software Integrated Circuits' and heavily influenced by Smalltalk — yet another legacy from Xerox PARC, along with desktop GUIs, ethernet and laser printers. It was adopted early on by Steve Jobs' NeXTStep, the grand-daddy of all that is now OS X. It had to wait, however, for the mobile device revolution to have its day, being ideally suited to the limited resources on portable devices. It's still being actively developed by Apple and others, sporting the new automatic reference counting and static analysis in the Clang compiler. It turns out it has supported dynamic patching of code in applications all along. What more surprises does this venerable language have up its sleeve?"

437 comments

  1. New features by bonch · · Score: 5, Informative

    What more surprises does this venerable language have up its sleeve?

    Clang recently added literal syntax for collections and boxed numbers:

    // Old way.
    NSArray *array = [NSArray arrayWithObjects:@"one", @"two", @"three", nil];
    NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
                                                @"bar", @"foo",
                                                @"post", @"first",
                                                nil];
    NSNumber *num = [NSNumber numberWithInteger:42]; // New way.
    NSArray *array = @[ @"one", @"two", @"three" ];
    NSDictionary *dict = @{
                                                  @"foo" : @"bar",
                                                  @"first": @"post"
                                                };
    NSNumber *num = @42;

    Properties will also be synthesized by default, so you won't have to write @synthesize statements anymore, and corresponding ivars will be synthesized with an underscore prefixed name.

    Objective-C is interesting to follow because it's a language that was once considered totally niche and almost completely irrelevant, but the frameworks were beloved by developers, and the language's keepers kept at it long enough for the world to see how useful the language is. It also has historical significance as the tools used for creation of the original WorldWideWeb program as well as the development of Doom and Quake. John Romero wrote about he and Carmack simultaneously editing the same map in DoomEd thanks to distributed objects.

    It's still verbose and Smalltalk-ish, but the language as a whole has improved drastically since the transition to Clang. According to the mailing list, Apple has more engineers allocated to the language than ever before, and a lot of it has to do with the move away from GCC.

    I hear that GCC is working toward being easier to modify, so the competition from Clang has been good for everybody, and it's all open source.

    1. Re:New features by Anonymous Coward · · Score: 0, Troll

      Sad sad day. Objective-C sucks! C# rocks!

    2. Re:New features by flakas · · Score: 4, Interesting

      Sad sad day. Objective-C sucks! C# rocks!

      In many ways this is true, but then again, they aren't the same kind of languages. I absolutely love C# syntax and the easy readability of the code. .NET libraries are also wonderful, and in general I would rather use C# than Objective-C because of this.

      But Objective-C is closer to C and C++ than C#. I would however hope that Apple brings something like C# to OS X and iOS. I would start developing with them right away.

    3. Re:New features by Anonymous Coward · · Score: 4, Informative

      Ignorant comment. You don't need Apple to do objc. The compilers are open source. (Both gcc and clang.) There is also the GNUstep project, which implements many of the NS* classes.

    4. Re:New features by Anonymous Coward · · Score: 0, Flamebait

      Piss off, troll. Developers have always had to shell out for tools to program on their chosen target platform. Nothing's free.

      I'm sure someone just handed you a free PC when you decided to program for Windows or Linux.

    5. Re:New features by gwking · · Score: 5, Informative

      The readability is a bit clearer in C#, but Apple is already fixing that in Obj-C with changes like auto synthesizing properties and making the declarations of common objects simpler like the initial poster showed (with code examples). But aside from simple things like that, the readability of the code depends a lot more on the programmer than on the language.

      If you haven't used Obj-C, at least not on an Apple platform, then that's why you don't know that Apple provides excellent frameworks very much like MS provides .NET. Check out: https://developer.apple.com/library/mac/navigation/#section=Frameworks Almost anything you want to do, Apple provides the foundational building blocks to help you build the application, and not waste time implementing a queue, list, or talk to a webserver.

    6. Re:New features by Maury+Markowitz · · Score: 1

      "Clang recently added literal syntax for collections and boxed numbers"

      Oh thank your deity. Long overdue IMHO.

    7. Re:New features by gwking · · Score: 5, Insightful

      You don't need Xcode to use Obj-C. Clang and gcc are open source and you can use them on Linux and Windows. You can even use clang in Visual Studio! If you mean that you want to develop OS X or iOS applications then yes, you should at least have one of those around to test on. And please hold any more complaints about Xcode being Mac-only until MS releases Visual Studio that isn't Win-only.

    8. Re:New features by Sarten-X · · Score: 5, Funny

      I'm sure someone just handed you a free PC when you decided to program for Windows or Linux.

      My last Linux dev box was pulled from a dumpster by a friend, and was handed to me. I wiped the Windows XP installation off, installed Debian, and happily started coding, so, um... yes.

      --
      You do not have a moral or legal right to do absolutely anything you want.
    9. Re:New features by PlastikMissle · · Score: 1

      C# is already available on both MacOS and iOS through Mono.

    10. Re:New features by Richard_at_work · · Score: 1, Troll

      Let me guess, a Windows developer killed your dog, slept with your wife, read your Sports Illustrated and ruined your birthday party?

      Or are you just the type that holds a stupid trollish opinion about something you obviously have no idea about?

    11. Re:New features by PlastikMissle · · Score: 1

      You do realize there's more than GUI building to C#, right?

    12. Re:New features by Anonymous Coward · · Score: 0

      It is simple enough to prove your statement false with a single example of a "Windows programmer" writing C# code without a GUI drag and drop. I am no Windows zealot but give me break. That is an absurd statement.

    13. Re:New features by Anonymous Coward · · Score: 3, Informative

      STFU whippersnapper, when I was a kid we cut punchcards out of coke boxes and punched them with our teeth -- and we liked it.

      But seriously -- if you don't have a computer to run your programs on, it doesn't much matter whether you have one to write them on or not. There was a day when every computer came with the usual set of programming tools (granted, for much of this period the programming tools, at least on home machines, were rather minimal and essential to using the computer as well). So even if you only ever ran other people's programs, you had a BASIC interpreter right there if/when you took up programming. I understand why few people have any use for development tools these days, but you'll note all the main consumer OSes/OS vendors provide a free development environment for that platform, even if it's not installed with the OS -- almost every Linux distro packs GCC, Apple offers Xcode, and Microsoft offers a stripped-down version of Visual Studio. Lucky for GP, there's also free Objective-C compilers for pretty much all platforms -- it seems more likely that he didn't know of them (due to everyone's retarded focus on Objective-C only w/r/t iOS) than that he's trolling.

    14. Re:New features by binarylarry · · Score: 1, Funny

      Yeah but it's not even original. It's a bad knock off of Java.

      So it's like a Soviet Russian knock off of fisher price where instead of safe plastic, you get sharp rusty metal that give you AIDS and locks you into a lifetime treatment program to survive.

      --
      Mod me down, my New Earth Global Warmingist friends!
    15. Re:New features by aceboomblain · · Score: 2

      What you are referring to has been around longer that C#, it's called Java.

    16. Re:New features by Anonymous Coward · · Score: 0

      It's a superb knock-off of Java. In fact, it is such a good knock-off that it is better then the original.

    17. Re:New features by Anonymous Coward · · Score: 1

      Sounds a lot like the Mono vs .NET debacle. There's absolutely nothing that says that Apple won't just come around and sue everybody elses buts off for unlicensed use of Objective-C and Apple's copyrighted APIs.

    18. Re:New features by Anonymous Coward · · Score: 0

      It _literally_ looks nothing like vomit, but feel free to assert that it looks like vomit, speaking figuratively.

    19. Re:New features by omfgnosis · · Score: 1, Funny

      You should see a doctor!

    20. Re:New features by spiffmastercow · · Score: 1

      By GUI widgets are you referring to the drag and drop windows forms crap? Because I don't use that. On the other hand, if you're talking about intellisense, that feature is a freaking godsend and has reduced the amount of time I spend looking at API reference manuals to almost zero.

    21. Re:New features by Dishevel · · Score: 5, Funny

      Let me guess, a Windows developer killed your dog, slept with your wife, read your Sports Illustrated and ruined your birthday party?

      Worse.
      A Windows developer developed Norton.
      Another Windows developer got drunk one night and had all of his humanity removed and wrote Mcafee.
      Then there was the infamous Windows developer that did Internet Explorer. I heard he started his career of terror by writing THIS program.

      --
      Why is it so hard to only have politicians for a few years, then have them go away?
    22. Re:New features by ColdWetDog · · Score: 5, Funny

      That's nothing!

      I built my last dev box from parts that I picked up off the side of the road as the electronic recycling trucks drove past.

      The case comes from old cardboard boxes stolen from underneath the bridge where the homeless folks congregate.

      It's powered by making extension cords unwound from burnt out vacuum cleaner motors and running them under high voltage power lines.

      I got the software by painstakingly gluing a pile of old AOL CDs back together.

      --
      Faster! Faster! Faster would be better!
    23. Re:New features by coinreturn · · Score: 1

      I'm sure someone just handed you a free PC when you decided to program for Windows or Linux.

      My last Linux dev box was pulled from a dumpster by a friend, and was handed to me. I wiped the Windows XP installation off, installed Debian, and happily started coding, so, um... yes.

      Well, go look for a dumpster with a Mac in it - problem solved.

    24. Re:New features by coinreturn · · Score: 1

      AC does not know what it talking about. XCode is a joy to use.

    25. Re:New features by Eponymous+Hero · · Score: 1, Troll

      no, leave it there. that's where it belongs.

      --
      insensitive clod overlords obligatory xkcd car analogy russian reversals whoosh pedant fanbois ftfy in 3...2...1..PROFIT
    26. Re:New features by WrongSizeGlass · · Score: 4, Funny

      Sounds a lot like the Mono vs .NET debacle. There's absolutely nothing that says that Apple won't just come around and sue everybody elses buts off for unlicensed use of Objective-C and Apple's copyrighted APIs.

      Oh, come on, Apple isn't going to sue you for using Objective-C. They send you a sympathy card and a case of aspirin.

    27. Re:New features by St.Creed · · Score: 1

      He's probably referring to the left-hand-side menu containing the template code for buttons, listboxes etc. It's still a stupid remark though. Who cares if you automate some tedious programming stuff - that's the whole point of using the computers in the first place!

      --
      Therefore, by the (faulty) logic you're using, you're just a cow with a keyboard - osu-neko (2604)
    28. Re:New features by Anonymous Coward · · Score: 0

      Richard Stallman, ladies and gentleman.

    29. Re:New features by lightknight · · Score: 1

      Says someone who has never used it.

      It's better than Java.

      --
      I am John Hurt.
    30. Re:New features by spiffmastercow · · Score: 1

      My problem with the drag and drop widgets isn't that it automates work.. I try to automate whatever I can whenever I can. I just don't like the fact that always seems to do it in such a way that, were I to customize something, it's significantly more difficult than if I code it myself. It's really a moot point for me though, as I rarely have to do any GUI coding, and when I do it's usually coding a special widget in our library for other devs to use.

    31. Re:New features by skids · · Score: 2

      My last Linux dev box was pulled from a dumpster by a friend, and was handed to me. I wiped the Windows XP installation off...

      Yes it's a shame how people throw away things that other people might want, and then other people throw garbage on top of it. I've had to wipe egg salad off a few things I've salvaged, but Windows XP? Yeauchk! I hope you burned the towelettes afterwards.

    32. Re:New features by StikyPad · · Score: 1

      You obviously weren't looking very hard. (WARNING: Do not click if you do not want to see Objective-C code with partially digested bits of dinner in it.) http://i47.tinypic.com/nyzl28.png

    33. Re:New features by Anonymous Coward · · Score: 0

      You may not want to hear this, but I recently realized I *really* needed an OS X box to test stuff on, and I decided to build a hackintosh (that is, I installed it on my current PC running Win7/Linux that happened to have parts that were compatible with OS X), and while it was some pain to get 100% working, it is now working rather well (performing better than a $2500 Mac Pro) and I've installed XCode and everything from the App Store and if I wanted I could actually develop for OS X/iOS on this machine.

      If the above doesn't sound completely appalling to you, you could consider going the hackintosh route. If you don't have a compatible motherboard (the most important bit - Gigabyte tends to work well), you could always try to pick compatible parts the next time you buy a PC, if only to keep the option of doing a hackintosh open. I'm closer to being an Apple basher than an Apple fanboi, but being able to fiddle with all three main OSes in use today makes me happy. Choice > Superiority!

    34. Re:New features by binarylarry · · Score: 1

      I've used both champ. .NET is okay on windows, but Mono is horrifically bad on real development platforms.

      Developing software on windows isn't for professionals, so there is your dilemma.

      Java is mature and fast (but tubby), has great tools and library support and runs everywhere. .NET... not so much.

      --
      Mod me down, my New Earth Global Warmingist friends!
    35. Re:New features by pLnCrZy · · Score: 1

      and when I do it's usually coding a special widget in our library for other devs to use.

      So that they can... drag and drop it into their projects? What if they want to customize it? I would imagine they're better off coding it themselves.

    36. Re:New features by terjeber · · Score: 1

      Yes, and you have not been outside of your own head since 2002? C# is what Java desires to be but can't decide how to accomplish.

      It's not Ruby, but it is as close as you can get among the bigger programming languages. COBOL is COBOL, even if they insist on calling it "Java" these days.

    37. Re:New features by terjeber · · Score: 1

      COBOL is COBOL, even if they insist on calling it "Java" these days.

    38. Re:New features by terjeber · · Score: 1

      Wow. You really are quite clueless, are you not? Mono on Android, for example, beats the crap out of Java on Dalvik. On other Linux flavors, the story is much the same. .NET is mature and fast, and has great tools and library support (most of what you can find for Java is also available for .NET) and runs not quite as many places as Java, but that is mostly a concern if you are doing embedded development.

    39. Re:New features by terjeber · · Score: 1

      You are almost correct. Java has been around a lot longer than C#, but it hasn't been properly maintained (maintenance through committee never works) and it is therefore lagging quite significantly behind C# today. Generics is a joke. Autoboxing is a bad idea gone wrong. The VM desperately needs an overhaul with regards to supporting modern technologies (dynamic languages and language concepts for example are significantly faster on the Microsoft VM than on Java). Java is COBOL. Sad but true. Sad because I used to love Java. I was part of a team that brought one of the earliest commercial apps to market on Java. Java's been terminally ill though, since long before Oracle got involved.

    40. Re:New features by Yold · · Score: 2

      It's still too verbose

      Fixed that for you. For the uninitiated, trimming a string is as simple as

      NSString *s = [stringToTrim stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceCharacterSet]];

      The way the language functions is beautiful, but they seriously need to get rid of stuff like this.

    41. Re:New features by Yold · · Score: 1

      You can always use MonoTouch (http://xamarin.com/monotouch), if you want to write C# on iOS.

    42. Re:New features by spiffmastercow · · Score: 1

      and when I do it's usually coding a special widget in our library for other devs to use.

      So that they can... drag and drop it into their projects? What if they want to customize it? I would imagine they're better off coding it themselves.

      Yes, because there's never ever any reason to standardize anything, particularly among a group of related projects that require a consistent user experience.

    43. Re:New features by Anonymous Coward · · Score: 0

      Apple didn't invent Objective-C.

    44. Re:New features by pLnCrZy · · Score: 1

      Yes, because there's never ever any reason to standardize anything, particularly among a group of related projects that require a consistent user experience.

      Like the extensive libraries of standardized "widgets" used commonly in GUI design to provide a consistent user experience. Those which you condemn for their drag-and-drop nature, because even though they are standardized, you must customize them, therefore you'd be better off just coding it yourself. Lather, rinse, repeat.

    45. Re:New features by Anonymous Coward · · Score: 0

      Pshaw! I'm posting this on a Commodore 64 that I dug up from the ground in Afghanistan.

    46. Re:New features by drkstr1 · · Score: 1

      AC does not know what it talking about. XCode is a joy to use.

      I personally can't stand it, but I think it really just comes down to what your used to. I've work with KDevelop, Eclipse, and VS, all of which I find at least tolerable. I just couldn't get used to XCode though. The editor is not as advanced IMHO, with things like text selection, auto formatting, and cursor placement/tabbing while writing code. Code re-factoring also leaves much to be desired. I will concede the "wonky" windowing behavior is just because I'm not used to using a Mac, but at the very least, it seemed more difficult to get custom views and perspectives to work the way you want them to. Eclipse is probably the best for that last one, which is why I usually go with that, provided it has an extension for the language/tooling I'm using at the time.

      --
      Fanboy Status: Apache Flex, C#, Eclipse, KDE, Pirate Party, Ron Paul, Slackware, Windows 7
    47. Re:New features by Anonymous Coward · · Score: 0

      Near as I can tell, the Clang-for-Visual Studio extension project (ClangVSx) is deader than a Norwegian Blue in a petshop. It saw two very alpha releases last year and hasn't had any activity since.

      Meanwhile, MonoDevelop works fine across three platforms.

    48. Re:New features by lister+king+of+smeg · · Score: 1

      are you sure you aren't confusing XCode and GIMP? :-P

      --
      ---Saying gnome 3 is better than windows 8 not so much a compliment as it is damning with light praise.
    49. Re:New features by Nerdfest · · Score: 2

      I've spent all afternoon fighting the urge to make a joke about Apple forcing the use of a language that was written by Love/Cox. I think I've done surprisingly well.

    50. Re:New features by rmstar · · Score: 1

      NSArray *array = @[ @"one", @"two", @"three" ];
      NSDictionary *dict = @{
                                                          @"foo" : @"bar",
                                                          @"first": @"post"
                                                                                              };
      NSNumber *num = @42;

      Eeew... that horrendously baroque stuff is what exactly?

      Better to use Lisp instead.

    51. Re:New features by lister+king+of+smeg · · Score: 1

      cobol is only for enterprise apps any more and has all of what three devs?

      java is used by android the largest smart phone ecosystem out there hardly a dinosaur.

      --
      ---Saying gnome 3 is better than windows 8 not so much a compliment as it is damning with light praise.
    52. Re:New features by ChipMonk · · Score: 2

      Sadly, given the fact that Oracle has sued Google over nine lines of standard library code for the Java language (developed by Sun, bought out by Oracle), it wouldn't shock me at all to hear that Apple has sued over Objective-C.

      I know, the parent comment is funny, but the best humor has a grain of truth. In this case, it's a grain of sand in a shoe.

    53. Re:New features by spiffmastercow · · Score: 1

      Okay, we're talking past each other here.. One, I'm talking about customizing their location, event listeners, etc. If that's all done in a draggy-droppy sort of way, then it's hard to organize that information, and setting properties to something besides a constant can be a real pain in those circumstances. At least, that has been my experience in the specific example of Visual Studio. I'm not condemning the use of those standardized widgets, but rather a certain way of using them. The widgets I develop are used in addition to the core library widgets. This too is moot, as our shop primarily does web development using MVC, so there's no dragging and dropping to be done most of the time. And even if there was, my primary job function is to develop libraries, and thus I'm doubly removed from dragging and dropping.

    54. Re:New features by shutdown+-p+now · · Score: 1

      That's not "long overdue", that's just nice to have in the grand scheme of things. Keep in mind that we're talking here about a language that has only added automatic reference counting about a year ago - until then you had to manually release things, which really made me nostalgic over Win32 COM circa 1996 (until ATL), which is the last time I've seen that kind of thing.

      Seriously, while it's good that Obj-C is progressing, most of the newly added features just go to show how positively ancient the language actually was until very recently.

    55. Re:New features by HiThere · · Score: 1

      Macs are generally very nice machines. It's only the EULAs they stick on their software that drove me away from them. And Linux installs quite easily. (Or at least it did the last time I tried. They may be nice, but not enough to cause me to pay the extra price. So instead I buy from ZAReason or Penguin Computing.)

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    56. Re:New features by TrancePhreak · · Score: 1

      XCode is a pain in the ass. Especially the latest version where they've added tabs that don't act like any other tab system and removed useful features like Interface Builder plugins.

      --

      -]Phreak Out[-
    57. Re:New features by TheRaven64 · · Score: 1

      XCode 3 was. XCode 4 improved a lot of things on the back end (e.g. using libclang instead of some hacky stuff), but the number of UI regressions is quite amazing.

      --
      I am TheRaven on Soylent News
    58. Re:New features by TheRaven64 · · Score: 2

      Why? Anyone can look at that line and understand exactly what it does without any knowledge of the APIs (although those of us that are familiar with them will suspect that you probably meant +whitespaceAndNewlineCharacterSet). It's more to type, but given that even vim with the clang plugin can autocomplete from a couple of characters that's not really an issue. Most code spends a lot more time being read than being written, and Objective-C is very easy to read.

      --
      I am TheRaven on Soylent News
    59. Re:New features by TheRaven64 · · Score: 1
      It's worse. They did some really stupid things in the new version. Consider the following code:

      id a = @42;
      id b = @"42";

      The first of these, every time this scope is entered, creates a new autoreleased NSNumber instance. The second creates a statically allocated instance. The syntax for 'static' (meaning a new autoreleased instance is allocated whenever it goes into scope) collections has no support for creating mutable instances, making it useless in at least half of the cases where we've wanted it.

      --
      I am TheRaven on Soylent News
    60. Re:New features by cyber-vandal · · Score: 1

      You mean Visual Studio has a clairvoyant extension that figures out what your business will need from now until whenever and generates all the code for you? Fuck me where's that option, it would save me so much time! You might enjoy spending days of trial and error getting a screen to look right but I realise that computers are there to make people's lives easier. In any case I was using a screen designer in 1991 doing CICS COBOL screens so it's not exactly a new-fangled idea, except to weirdoes like yourself. I've come across dyed in the wool people who refused to use a step-through debugger because "you can't rely on it" and preferred to have zillions of print statements to wade through instead. I assume you're one of those.

    61. Re:New features by cyber-vandal · · Score: 1

      The only thing that Java and COBOL have in common are that they're programming languages.

    62. Re:New features by cyber-vandal · · Score: 1

      Java and COBOL are nothing like each other. You obviously know nothing about either.

    63. Re:New features by gbjbaanb · · Score: 1

      One think I read recently was a blog of a .NET developer who decided to switch to iOS development.

      He thinks the frameworks are better than MS's tools:

      IB rocks. It's so good that I have never once needed to look at the XML it generates to serialize UIs. Imagine using Cider or Expression Blend and never needing to look at and edit XAML by hand!

      and is complementary about iOS itself:

      iOS apps run lightning fast. Not having the overhead of a managed runtime environment, a garbage collector, code-access security, etc. really helps keep iOS apps fast and easy on the battery

      I just think its a bit of a shame they went with objective-C which is a bit strange, they might have been better off with C++ which has as many quirks as obj-C but is more widely known and is just as performant.

    64. Re:New features by petsounds · · Score: 1

      No, I'm pretty sure "long overdue" in the context of a horribly outdated language getting a feature it should've had ten years ago is an apt description.

      Unfortunately there are a lot of Objective-C old-timers, both at Apple and abroad, who think that Objective-C is a great language and don't see how it needs much refinement (seriously, I've had this discussion with an Apple engineer). It's that kind of masochistic attitude about programming that went out of style in the 90s that runs in spades with old-timer Objective-C guys, but they stayed in a purely ObjC world for the last 15 years and have sort of been frozen in time like programming cavemen.

      Then there's the whole other discussion about Apple's APIs; they're just as convoluted and inelegant as the language itself, but that's the mode of thinking they seem to be stuck in. I mean just look at the Core Graphics API. Holy shit, what a clusterfuck. Say what you will about Flash, but its Actionscript graphics API and the whole display architecture is very elegant.

    65. Re:New features by Anonymous Coward · · Score: 0

      > Apple didn't invent Objective-C.

      And Oracle didn't invent Java, but that's not stopping them from suing over it.

    66. Re:New features by Jane+Q.+Public · · Score: 1

      "Anyone can look at that line and understand exactly what it does without any knowledge of the APIs ..."

      So what? If you're programming without knowledge of the APIs, maybe you shouldn't be programming in the first place.

      Compare that with some other language:

      my_string.strip

      I don't see any more ambiguity -- or need to know about the APIs -- there than in GP's example.

    67. Re:New features by Anonymous Coward · · Score: 0

      Apple is *benefitting* from the open source natures of the compilers. They are using them in xcode. They don't want to ruin that by suing people who are using upstream.

    68. Re:New features by Jane+Q.+Public · · Score: 2

      "But aside from simple things like that, the readability of the code depends a lot more on the programmer than on the language."

      I would dispute this. In fact I think it is a rather bizarre statement. Take the example I gave earlier. Here's the Obj-C:

      NSString *s = [stringToTrim stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceCharacterSet]];

      Here's the same functionality in MacRuby (a Ruby wrapper for Obj-C):

      my_string.strip

      Which one is easier to read? While I don't claim that MacRuby compiles to code that is quite as fast as native Obj-C, which one is easier to read is hardly in question. And that's mostly a matter of the language, not the programmer.

    69. Re:New features by SuperKendall · · Score: 1

      my_string.strip
      I don't see any more ambiguity -- or need to know about the APIs

      Oh really? What does it strip?

      Would it strip a tab? A newline? I can't be sure coming in. I would absolutely read up on what it thought was useful to strip, if I had not used that language before.

      What if you wanted it to strip based on custom characters?

      And again - why is your example any better or worse, just because it's shorter? It's one line either way, it takes the same amount of time to read and to write (thanks to auto completion).

      --
      "There is more worth loving than we have strength to love." - Brian Jay Stanley
    70. Re:New features by Kalriath · · Score: 1

      Bwahaha! Wow, it almost looks like you think you're being serious!

      XCode is truly awful. I'm finding AppCode to be a much better alternative, and have heard there are a couple of other IDEs as well (but have not yet tried them and can't recall the names).

      --
      For a site about things like basic rights, Slashdot users sure do like to censor "dissent".
    71. Re:New features by Kalriath · · Score: 2

      Dear god, how the fuck did I write that console application with no UI?!?

      --
      For a site about things like basic rights, Slashdot users sure do like to censor "dissent".
    72. Re:New features by Kalriath · · Score: 1

      COBOL actually has a surprisingly large number of developers, all paid better than all of us!

      It's still quite common in Government, Banking, and Healthcare.

      --
      For a site about things like basic rights, Slashdot users sure do like to censor "dissent".
    73. Re:New features by Jane+Q.+Public · · Score: 1

      "Would it strip a tab? A newline? I can't be sure coming in."

      Nor can you be sure of exactly the same thing in the Objective-C example.

      I did not state that my example was better or worse, I stated that it needed no more assumptions about the API.

      What does whitespaceCharacterSet include? Some people (and some contexts) assume that newlines and carriage returns are whitespace.

      You still need to know about the APIs. If you don't, you shouldn't be attempting to program.

    74. Re:New features by Anonymous Coward · · Score: 0

      The second one is an NSString.

    75. Re:New features by tyrione · · Score: 2

      Ignorant comment. You don't need Apple to do objc. The compilers are open source. (Both gcc and clang.) There is also the GNUstep project, which implements many of the NS* classes.

      Yes and No. GNUStep has a long way to go before it completely supports AppKit, Foundation Kit, missing Core Data and more.

    76. Re:New features by tyrione · · Score: 1

      What looks like vomit is C++ and old style C. If you can't handle getData:withDataObject:.... then life must be truly painful to your mind.

    77. Re:New features by tyrione · · Score: 1

      It's still too verbose

      Fixed that for you. For the uninitiated, trimming a string is as simple as NSString *s = [stringToTrim stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceCharacterSet]];

      The way the language functions is beautiful, but they seriously need to get rid of stuff like this.

      That's what makes it beautiful. It's f'n readable from left to right.

    78. Re:New features by am+2k · · Score: 2

      I just think its a bit of a shame they went with objective-C which is a bit strange, they might have been better off with C++ which has as many quirks as obj-C but is more widely known and is just as performant.

      C++ doesn't support the dynamic dispatching needed for what makes Cocoa so great to write. Apple tried to switch to Java (which has reflecrion), but it was too slow, so they abandoned that attempt.

    79. Re:New features by slartibartfastatp · · Score: 1

      When I was a kid, my stepfather was concerned that I spent too much time with my speccy48 clone, so I was limited to use it for one hour per day.

      What I did? I started to write my programs on paper, and enjoy the most of my "timeshare". That raised my coding level a lot.

      But still I won't thank him.

      --
      -- --
    80. Re:New features by jcr · · Score: 1

      Maury! Where have you been lately?

      Yeah, the new literal syntax is handy. I've wanted something like it for years.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    81. Re:New features by bonch · · Score: 1

      It doesn't matter how the second instance is allocated (string literals are created at compile-time, so they exist for the duration of the program). All that matters is the ownership rules which state that you own neither of the objects. Additionally, ARC can optimize autoreleased objects so that they don't enter the autorelease pool.

      Creating mutable instances is as simple as sending a -mutableCopy message to the collection literal, just as you can already do with string literals: [@"blah" mutableCopy]

    82. Re:New features by Anonymous Coward · · Score: 0

      Slashdot's code tag doesn't preserve formatting very well.

    83. Re:New features by coinreturn · · Score: 1

      AC does not know what it talking about. XCode is a joy to use.

      I personally can't stand it, but I think it really just comes down to what your used to. I've work with KDevelop, Eclipse, and VS, all of which I find at least tolerable. I just couldn't get used to XCode though. The editor is not as advanced IMHO, with things like text selection, auto formatting, and cursor placement/tabbing while writing code. Code re-factoring also leaves much to be desired. I will concede the "wonky" windowing behavior is just because I'm not used to using a Mac, but at the very least, it seemed more difficult to get custom views and perspectives to work the way you want them to. Eclipse is probably the best for that last one, which is why I usually go with that, provided it has an extension for the language/tooling I'm using at the time.

      I can respect that you think other systems are better. My argument was with the AC who said that Xcode was "piss poor" and the opposite of intuitive. That's just hyperbole and unnecessary name-calling. I grant that Xcode is not perfect. I don't know what version you last used, but I think the all the predictive stuff is so good that it's faster than using copy-paste for similar blocks.

    84. Re:New features by coinreturn · · Score: 1

      Bwahaha! Wow, it almost looks like you think you're being serious!

      XCode is truly awful. I'm finding AppCode to be a much better alternative, and have heard there are a couple of other IDEs as well (but have not yet tried them and can't recall the names).

      I am serious. AppCode website lists no features not currently in Xcode. I'm betting AppCode doesn't integrate the provisioning/code signing like the latest Xcode either, and if it did, I sure wouldn't put my AppleID and password into someone else's IDE.

    85. Re:New features by Kalriath · · Score: 1

      I cower in fear of your legendary tolerance of god-awful, slow, IDEs. And who cares about "integrating the provisioning/code signing" - are you really so lazy you won't log into the Provisioning Portal for a measly 30 seconds to provision your apps? How thoroughly lazy.

      And as it happens, I do trust JetBrains not to screw me over - they're a big name that's been in business for over a decade making awesome software (of which I use several).

      --
      For a site about things like basic rights, Slashdot users sure do like to censor "dissent".
    86. Re:New features by Anonymous Coward · · Score: 0

      Have you looked at the top contributors of the LLVM Clang compiler project? Apple pretty much runs the place.

    87. Re:New features by Anonymous Coward · · Score: 0

      You say that as if being better than java was a huge achievement. Designing a language that is better than java is equivalent to killing a blue slime.

    88. Re:New features by Maury+Markowitz · · Score: 1

      "Unfortunately there are a lot of Objective-C old-timers, both at Apple and abroad, who think that Objective-C is a great language and don't see how it needs much refinement"

      Hmmm. I'm one of those old-timers (well, semi-old) and I can assure you we complain just as loud, or more loudly, than most. Your experience is very much not of the norm, and I suspect you are conflating the negative with the common.

    89. Re:New features by Maury+Markowitz · · Score: 1

      > I absolutely love C# syntax and the easy readability of the code.

      I agree. I found the experience of programming in C# generally enjoyable, and the IDE was one of the better ones I've used.

      > .NET libraries are also wonderful

      I disagree. They are certainly no match for Cocoa.

      Consider one example, the lowly combo box. For decades (literally) people have been asking for MS to support the multi-column format found in Access. Over and over and over and over. Nothing in GDI, so it's not surprising it wasn't in MFC or WTL. And it's not entirely surprising it wasn't in WinForms, right? But why not in WPF? And if that's not enough TLA, it's not in .NET Micro either. Seriously? And I *still* have to buy a 3rd party lib just to get real work done?

      Or consider data access ODBC comes out and, IMHO, it remains one of the few good data access APIs ever made. But the early drivers sucked, and it didn't handle the results in a programmer-friendly way. Ok, so RDO. Geez, slow on top of slow, ok lets try DAO. Oh, that's not very good, so OLEDB, wait I mean ADO. Oh geez, ok how about ADO.NET? Oh, darn, ok fine, let's throw out ACE and see if that sticks. Oh, and none of this is working on 64 bit? Ok, port-o-rama!

      Funny part to all of this? When you look at the results all of these system produce, you find they're bug compatible with the original ODBC drivers. It's new code, don't get me wrong, but *they copied the bad code*. Meanwhile, ODBC continued to improve, and iODBC absolutely kicks ass. If they just stuck it out with ODBC and waited until they really understood how to wrap it, we'd all be using it today. Like we do under Cocoa.

      When MS builds new stuff, like C#, it tends to be pretty damb good. They look at what's out there, select the good, fix the bad, and there it is. But when they're trying to fix something that already exists it seems they invariably just re-apply the lipstick to the chicken. Then they give you both, and when we note it has the same problems they throw up their hands and cry "well what do you want already?!"

    90. Re:New features by Anonymous Coward · · Score: 0

      Sad sad day. Objective-C sucks! C# rocks!

      In many ways this is true, but then again, they aren't the same kind of languages. I absolutely love C# syntax and the easy readability of the code. .NET libraries are also wonderful, and in general I would rather use C# than Objective-C because of this.

      But Objective-C is closer to C and C++ than C#. I would however hope that Apple brings something like C# to OS X and iOS. I would start developing with them right away.

      Maybe you should look at Monotouch www.xiaman.com C# on iOS is already available.

    91. Re:New features by MightyYar · · Score: 1

      Oracle (or more properly their subsidiary Sun) certainly did invent Java. Search for James A. Gosling.

      Incidentally, Gosling supports Oracle's action against Google, despite having left Sun as it was acquired by Oracle and having no particular love for Oracle.

      --
      W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
    92. Re:New features by MightyYar · · Score: 1

      They are, but they are pricey. You get what you pay for. I consistently get 6 years out of the Macs - my current G5 Tower "kids computer" was purchased in (late) 2004 for around $2000. At the time, grotesquely expensive but I'm still editing video on it occasionally (because I like the older PPC version of iMovie for quick stuff) and at this point it has worked out to roughly $300/year. It's now obsolete because it won't run the newest software - Apple gave up the PPC ghost - but speed-wise it still is more than adequate and my kids use it for PBS kids and stuff now.

      Similarly, I have an overpriced HP workstation from the same era doing FreeBSD duty in my basement, chugging along like a champ. Again, nice but expensive hardware (and EEC RAM... big plus for ZFS).

      I have a similar lifetime out of my much cheaper PC, but I built that myself and chose nice components. Include all the time I spent researching and assembling that thing (and dealing with the Windows install... ugh) and the cost is even higher than the HP or Mac :)

      --
      W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
    93. Re:New features by MightyYar · · Score: 1

      but Windows XP? Yeauchk! I hope you burned the towelettes afterwards.

      Hey, some of that are holding on to that until either MS finally pulls the plug or the Mayans turn out to be right :)

      --
      W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
    94. Re:New features by rthille · · Score: 2

      Well, it's been years and years since I wrote Objective-C (I worked for AppSoft, doing NeXTStep Productivity Apps), and have never touched ruby, but to me, the Obj-C code is clearer. A hell of a lot more to type, but I know it's stripping the whitespace characters from 'stringToTrim' and creating a new string.

      my_string.strip looks like a call to a non-standard (project specific, locally developed) bit of code that could do anything. If I knew Ruby, I might totally know it _was_ standard and what it did. But if you can get past the Smalltalk syntax (which I think is a benefit, allowing/forcing documentation inline of the code), Obj-C is much more readable, and thereby more maintainable.

      --
      Awesome furniture, accessories and cabinetry in Santa Rosa, CA: http://humanity-home.com/
    95. Re:New features by Anonymous Coward · · Score: 0

      You're completely clueless. Java beats the crap out of Mono on Linux. Mono is a joke.

    96. Re:New features by Anonymous Coward · · Score: 0

      Oracle (or more properly their subsidiary Sun) certainly did invent Java

      That's my point. Oracle did NOT invent Java. Sun invented it, Oracle bought it. Just as NeXT bought the rights to Objective-C from Stepstone.

    97. Re:New features by Anonymous Coward · · Score: 0

      If by "easier to read" you mean "it has less characters, so you can read it in less time", then the Ruby version is better. But hey, then you'll probably prefer something much more readable, such as s/\S//g;, right?

      If by "easier to read" you mean "just by reading it, you get a precise idea of what the code does, even if you're not familiar with the libraries used", then the Ruby version is trash. Just what does that line do? Strips the string? Strips what? Spaces at the beginning? At the end? Newlines? Tabs?

    98. Re:New features by MightyYar · · Score: 1

      I believe you are making the mistake of conflating companies with people. The "inventor" of Java was James Gosling. He supports Oracle's action against Google. Whether the company is currently under Oracle or Sun brand name is not particularly important - many of the same engineers, managers, and ownership either way. All of the former owners of Sun at the time of the merger became owners of Oracle, as did the vast majority of employees. You could argue that Sun "bought" Java as well, since it was obviously the product of a person and team of people and not a non-human corporate entity.

      --
      W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
    99. Re:New features by coinreturn · · Score: 1

      I cower in fear of your legendary tolerance of god-awful, slow, IDEs. And who cares about "integrating the provisioning/code signing" - are you really so lazy you won't log into the Provisioning Portal for a measly 30 seconds to provision your apps? How thoroughly lazy.

      And as it happens, I do trust JetBrains not to screw me over - they're a big name that's been in business for over a decade making awesome software (of which I use several).

      Wow, worthless name calling. You are such a great debater! In case you didn't know, the "I" in IDE is "integrated" (which in this case includes integrated provisioning). Just because you think JetBrains is a big name in the business doesn't make it a good idea to give them your Apple ID credentials - that's just plain foolish. I also prefer the integrated documentation and code samples.

    100. Re:New features by Anonymous Coward · · Score: 0

      C# is MS-only, right? And we know ObjC is associated with Brad, who I had to share a wall with for a year Both showstoppers wrt using them. Ad hominem perhaps, but keyboards are not supposed to be *brown*

    101. Re:New features by terjeber · · Score: 1

      I also think that both Oracle and Google might disagree with you on your statement about Android.

    102. Re:New features by terjeber · · Score: 1

      Not true. They are also enterprise programming languages with an enormous amount of legacy software written in them. They are also quite slow to evolve and have not properly incorporated any newer language constructs since their inception. They are both what you would call dinosaurs, but Java is a little less close to extinction.

      Sadly there are no good signs on the horizon for Java evolution. I find it sad since I used to do a lot of work in Java. It has gone stale though. Long before Oracle bought Sun. They botched generics in a bad way, they implemented auto-boxing in an absurd way. The entire focus was on maintaining backwards (forwards in reality) compatibility in the JVM. That was, and is still, a major mistake.

    103. Re:New features by terjeber · · Score: 1

      Sigh. I wish you would turn on your brain. Java and COBOL has very little in common language-wise, but both are legacy enterprise languages that have been passed by younger, more nimble, and evolution-ready languages like Python, Ruby, SCALA and yes, indeed, C# (no comparison with the other mentioned languages though). Sun made many mistakes with Java, the worst was the insistence on maintaining VM compatibility.

    104. Re:New features by Lord_Jeremy · · Score: 1

      The second line creates a statically allocated NSString instance of "42"

    105. Re:New features by Anonymous Coward · · Score: 0

      You can split semantic hairs all you want, but it doesn't change the fact that Oracle had exactly zilch to do with creating Java. Java was fully developed and deployed long before Oracle bought Sun.

      Likewise, Gosling has nothing to do with Oracle's decision whether to sue or not. The only reason Oracle has that option is because they bought the rights to Java with the purchase of Sun.

      All this is to address the prior AC's suggestion that because Apple didn't invent Objective-C, they can't sue over it. They can, because they bought NeXT, who bought the rights from Stepstone. The situation is exactly parallel to Oracle, Sun, and Java.

    106. Re:New features by Anonymous Coward · · Score: 0

      Yes it's a shame how people throw away things that other people might want, .

      Here in Ottawa we are starting to use a site called curb side goodies, it might finally be THE solution to reusing things other people don't want.

    107. Re:New features by MightyYar · · Score: 1

      All this is to address the prior AC's suggestion that because Apple didn't invent Objective-C, they can't sue over it. They can, because they bought NeXT, who bought the rights from Stepstone. The situation is exactly parallel to Oracle, Sun, and Java.

      Yup, I agree with you 100%.

      --
      W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
    108. Re:New features by CptNerd · · Score: 1

      That example makes ObjC start to look like Perl...

      And not in a good way.

      --
      By the taping of my glasses, something geeky this way passes
    109. Re:New features by Anonymous Coward · · Score: 0

      Literals and Boxed Literals are a godsend. But (here's the cold water) technically, only literals will be in the 3.1 release of clang (due out later today). It's only been in the few weeks since they branched for the 3.1 release that they committed the support for boxed literals and those have not been ported to the release branch.

      No doubt, the 3.2 relase will have the full boxed literal syntax support, but if you want to use it today you should build clang from the top of tree repository rather than using the release branch that everyone will be talking about.

      And also be aware that Apple does not use clang's releases for the compiler it sticks in Xcode. They branch when they are ready, add code (both proprietary code and code that will eventually to be released into open source), and then they pack it all up with Xcode. So, as of today, no released Apple compiler has support for literals or boxed literals yet, but Apple does but it's almost a given that if you want an Apple released solution, expect the Xcode WWDC release in early June to have it.

      But if you are eager to play, you can get both literals and boxed literals today from the repository.

    110. Re:New features by jedwidz · · Score: 1

      Not a problem, you can write Objective-C++.

      Can we change the subject now please?

    111. Re:New features by Anonymous Coward · · Score: 0

      .strip may do the same as the obj-c code you wrote, but in obj-c you can add a strip method to NSString quite easily. It might take a few mins. to flesh it out, but whatever. pfft....act like you know..

    112. Re:New features by shmlco · · Score: 1

      At the time C++ hadn't really risen into dominance. ObjC, however, had more Smalltalk'ish features and dynamic binding.

      Hey. Who knew?

      --
      Any sect, cult, or religion will legislate its creed into law if it acquires the political power to do so.
  2. Comes of age? by V.+P.+Winterbuttocks · · Score: 1

    By my figuring it was legal in the mid-to-late 2000s.

    --
    I'm the real Vorokrytin P. Winterbuttocks.
    1. Re:Comes of age? by MightyYar · · Score: 4, Funny

      In software years, one does not come of age until his 30s, and only then because he finally accepts prostitution.

      --
      W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
    2. Re:Comes of age? by Anonymous Coward · · Score: 0

      I see what you did there.

  3. Yes but by Anonymous Coward · · Score: 2, Insightful

    Its recent success has obviously been tied to one gigantic hit platform, for which it is the only natively supported PL.

    1. Re:Yes but by Anonymous Coward · · Score: 1

      Similar to C#/VB and the other .NET languages...

    2. Re:Yes but by Galestar · · Score: 2, Interesting

      Similar to C#/VB and the other .NET languages...

      Not in the least. Windows is not tied to a language (you can use whatever you like), where iOS is. Now I can't comment on what languages are available for Windows Phone 7, or Windows 8 has/will have, but they do not have the platform adoption that iOS does. C# usage is based on its merits, where Objective-C usage is based on Vendor lock-in.

      --
      AccountKiller
    3. Re:Yes but by binarylarry · · Score: 0

      .NET like it's inspiration, Java, is heavily tied to it's primary language.

      The generated stack-oriented intermediate code is very, very similar to C# for .NET and the Java language for the Java platform.

      --
      Mod me down, my New Earth Global Warmingist friends!
    4. Re:Yes but by maccodemonkey · · Score: 5, Insightful

      And just like iOS, it's impossible to do an Android app without using Java. Sure, just like iOS, there are abstraction toolkits, support for C/C++, etc. But you can't do an Android app without Java.

      Yet I didn't see any complaining about Google forcing "Java vendor lock in" in your posts, and complaining about that being unfair.

    5. Re:Yes but by beelsebob · · Score: 3, Informative

      Uhh, C, C++ and Javascript are all supported on iOS... notably, one of those is below Obj-C on the list, and another is looking like it'll soon fall below obj-c.

    6. Re:Yes but by Billly+Gates · · Score: 1

      .NET and the win32 api is the tie in. MS was just nice to invent a MSIL so other languages can use it with a .NET api as a wrapper layer for the internal COM/win32 api.

      Java is tie in too with its own api. Its just that platform runs inside others but its hard to leave it.

      I do wonder what would of happened if Gore were elected and split up MS into 3 distinct corporations. .NET would not be tied to Windows as much as it now is and we might of had the whole .NET api and VS for the Mac and Linux. That would have been interesting. Perhaps Gnome 3 would be .NET based instead in that alternative universe? Since Java is as good as dead now thanks to the mismanagement of Sun and now the evil of Oracle it really blows. That leaves C#.net for enterprise web apps and portals unfortunately.

      Objective-C like mono is free. You can write linux apps with it. However the real api's are made for Apple just like C#.net.

    7. Re:Yes but by Anonymous Coward · · Score: 0

      I'll just leave this here:

      http://www.rubymotion.com/

      Also, HTTML5.

    8. Re:Yes but by spongman · · Score: 1

      none of the ms languages use all of the clr features. while c# and vb are getting closer over time, c++ and f# have significantly different requirements.

    9. Re:Yes but by McLoud · · Score: 1

      Thats like saying that C/C++ adoption on windows is due to vector locking because that's what the API is built on. Due to that, C-like bridges need to be build into other languages so they could talk to the OS
      The same can be done to talk to Objective-C

      DISCLAIMER: have been dealing with windows api the whole week and is not funny

      --
      sign(c14n(envelop(this)), x509)
    10. Re:Yes but by Galestar · · Score: 1

      The discussion was about the language/framework being tied to the OS, not the language being tied to the framework.

      --
      AccountKiller
    11. Re:Yes but by Galestar · · Score: 1

      The grandparent was comparing .Net to Objective-C. Their was no mention of Java.

      --
      AccountKiller
    12. Re:Yes but by Galestar · · Score: 1
      --
      AccountKiller
    13. Re:Yes but by Galestar · · Score: 1

      Not really. You can use any language you want on Windows, while you cannot do the same on iOS.

      --
      AccountKiller
    14. Re:Yes but by maccodemonkey · · Score: 1

      Given that Java is one of the top languages, it's a valid point if we're talking about vendor lock in monkeying with the list. If it wasn't for Android, Java would be lower on the list.

      If we're talking about C#, there are quite a few new APIs under Windows 7 that are C# only. Is that vendor lock in?

      Every vendor has a favorite language, and every vendor builds their new runtimes around it. This hardly goes into vendor-lock in. If I want to use Windows Presentation Foundation, I have to use a managed language in the .Net runtime. I wouldn't be doing so because the .Net languages are necessarily better, but I would have to because of the dreaded "vendor lock in." Microsoft decided not to release an unmanaged version of WPF that I would use with straight C.

      Is that a horrible evil thing? No. Microsoft clearly feels that .Net is their future, and they want to concentrate on that. My point is everyone does this, and if Objective-C was a crappy language, developers would have avoided it. Instead, they were chomping at the bit for Apple to release an Obj-C SDK for the iPhone.

    15. Re:Yes but by scot4875 · · Score: 1

      And just like iOS, it's impossible to do an Android app without using Java. Sure, just like iOS, there are abstraction toolkits, support for C/C++, etc. But you can't do an Android app without Java.

      Apparently someone has never heard of native code.

      --Jeremy

      --
      Jesus was a liberal
    16. Re:Yes but by pak9rabid · · Score: 1

      If we're talking about C#, there are quite a few new APIs under Windows 7 that are C# only. Is that vendor lock in?

      I'm confused. I was under the impression that one of the big advantages to using .NET languages was that once something is written and compiled into CLR bytecode (regardless of what the source language was), that could then be used by any of the other .NET languages. Is this not the case?

    17. Re:Yes but by terjeber · · Score: 1

      .NET like it's inspiration, Java, is heavily tied to it's primary language.

      Not really true since .NET 2.0 and basically clueless nonsense since .NET 3.5

    18. Re:Yes but by samkass · · Score: 1

      Its recent success has obviously been tied to one gigantic hit platform, for which it is the only natively supported PL.

      It's the only one supported by Apple, perhaps, but there are compilers for Flash, C#, C, C++, Ruby, Lua, and many others. Many games are written in Unity and compiled onto the various platforms, including iOS, without writing a scrap of Objective-C. There's even Codea, which is an iOS app that can generate iOS apps (the highly addictive Cargo-Bot, available in the app store, was written in it.)

      --
      E pluribus unum
    19. Re:Yes but by terjeber · · Score: 1

      And just like iOS, it's impossible to do an Android app without using Java

      Really. Seriously? You really mean that? I thought you could write native apps for Android too if you wanted.

    20. Re:Yes but by binarylarry · · Score: 1

      Dear Smarty,

      I'd love to see you back that one up.

      Thx

      --
      Mod me down, my New Earth Global Warmingist friends!
    21. Re:Yes but by Yold · · Score: 1

      Objective-C usage is based on Vendor lock-in

      You can write Objective-C on Linux and Windows, it's fully supported by GCC. You meant to say Cocoa. There is no reason why you can't write a QT GUI, or WinAPI application using Objective-C.

      Windows is not tied to a language

      But the .NET managed code environment, which is essentially MSIL (a language), certainly is tied to Windows. Most new Windows applications are written in .NET, which creates the same vendor lock-in problem you are trying to bash objective-c for. Mono is too incomplete to count, I'd imagine it lacks support for WPF, WCF, and other emerging .NET technologies.

    22. Re:Yes but by Yold · · Score: 1

      it's impossible to do an Android app without using Java

      The Android NDK lets you write code in C/C++. http://developer.android.com/sdk/ndk/index.html

      Seriously Slashdot, bring out the nerds. There is so much incorrect information in this thread getting modded up. Hold the obligatory "you must be new here" jokes.

    23. Re:Yes but by Galestar · · Score: 1

      You have flipped the argument on its head. I am arguing that iOS required Objective-C. You are arguing that Objective-C does not require iOS.

      For .Net, I am arguing that Windows does not require .Net. You are arguing that .Net requires Windows.

      So while your argument is correct, it has no relevance to the original discussion. The two arguments are completely different, and have very different implications.

      --
      AccountKiller
    24. Re:Yes but by Anonymous Coward · · Score: 0

      You must not be much of a nerd yourself, given that the NDK still requires you to wrap the final results in Java. It even says so in what you link, but I suppose that requires knowing enough to understand what you're linking to.

    25. Re:Yes but by coredog64 · · Score: 1

      I'd imagine that the parent poster is talking about capabilities that are only present in Win7 in general. Even if you used C/C++ you couldn't use said APIs in XP or Vista because they aren't implemented. I can't think of any off the top of my head though.

    26. Re:Yes but by shutdown+-p+now · · Score: 1

      The relative position of languages in TIOBE rankings is about as meaningful as a horoscope. If you really think that either C, C++ or JS are less popular than Obj-C, you're seriously deluded.

    27. Re:Yes but by cyber-vandal · · Score: 1

      If we're talking about C#, there are quite a few new APIs under Windows 7 that are C# only. Is that vendor lock in?

      Which ones?

    28. Re:Yes but by gbjbaanb · · Score: 1

      no, C# is based on vendor lock-in, its just that the vendor is Microsoft and they have a near monopoly on desktop apps.

      objective-C is also based on vendor lock-in, its juss that this vendor is Apple but they only have a majority share of mobile apps.

    29. Re:Yes but by gbjbaanb · · Score: 1

      yes, that is the case - you can reference an assembly written in any .NET language without knowing what created it - the import will read the metadata and give you a list of the classes etc that are contained within it.

      The same applies to COM - you access the dll via the IDL definition (or the compiled version of the same) so it doesn't matter what you wrote it in.

      They are now doing something similar with WinRT - any language will create a dll, but it creates a .winmd file to go with it that contains the metadata (think of this as an automatically-generated header file, if you're a C dev)

      But.. think of it like this, if you can generate 'extern C' functions, you can write any module in any language and then have it consumed by any language that understands binaries with C-exported functions. You could say that the MS improvements just give you class-based instead of function-based exports (that can only be consumed by MS apps admittedly)

    30. Re:Yes but by Kalriath · · Score: 1

      I guess he's referring to .NET features like WPF that are actually available on all OS versions supporting .NET. Since every .NET feature at its core still has to use the Win32 API to implement the nitty gritty, a Windows feature that's .NET only is impossible.

      --
      For a site about things like basic rights, Slashdot users sure do like to censor "dissent".
    31. Re:Yes but by spongman · · Score: 1

      actually, the win32 API uses pascal calling convention. their C compiler contains a built-in bridge to pascal (__stdcall).

    32. Re:Yes but by spongman · · Score: 1

      mono lacks complete support for the operating system libraries, but it has complete support for the language.

    33. Re:Yes but by macshome · · Score: 1

      The NDK though comes with several recommendations and caveats though as well. It's specifically intended to allow reuse of existing code or for parts of a program that are highly performance sensitive.

      Indeed Google says this about it, "The NDK will not benefit most applications. As a developer, you need to balance its benefits against its drawbacks; notably, using native code does not result in an automatic performance increase, but always increases application complexity. In general, you should only use native code if it is essential to your application, not just because you prefer to program in C/C++.".

    34. Re:Yes but by Galestar · · Score: 1

      Also considering that WPF is not an OS feature, it is a feature of the framework, it is pretty silly to use as an argument. Its like saying "but I can't use .Net anonymous functions in Java - therefore vendor lockin herp derp"

      --
      AccountKiller
    35. Re:Yes but by cyber-vandal · · Score: 1

      .NET is not just C# either.

    36. Re:Yes but by terjeber · · Score: 1

      I'd love to see you back that one up.

      Sigh. I'd like you to take a crash course in discussion too. You are the one with the statement, you're the one who would have to back something up. It is, as you should know if you had a brain, not possible to prove a negative. Now, a couple of pointers as to how and why .NET is no longer heavily tied to C#, take a look at what has been added to .NET for F# for example, and also all the work that has gone into the dynamic language aspect of .NET since last you were out of your mom's basement, I guess some times around 2002.

    37. Re:Yes but by binarylarry · · Score: 1

      and why .NET is no longer heavily tied to C#, take a look at what has been added to .NET for F#

      Writing a compiler that targets .NET IL (i.e. the knock off of java bytecode) doesn't make it less C# like. For example, Java has Clojure, which is functional and vert different from Java. But the compiler writer had to jump through hoops to get the clojure code compiled into something Java like.

      The DLR just adds a layer on top of the C# layer, specifically to make it easier to target scripting languages on the C#-centric CLR.

      Jesus you are a fuck up.

      --
      Mod me down, my New Earth Global Warmingist friends!
    38. Re:Yes but by kaffiene · · Score: 1

      Java was a popular programming language before it was chosen for Android, unlike Objective-c. If Apple had chosen C or C++ people wouldn't have made a big deal of it.

    39. Re:Yes but by kaffiene · · Score: 1

      Obj-C is behind C, C++ (and Java) on the Tiobe index. Javascript, however, ranks way way lower than I believe it should.

    40. Re:Yes but by shutdown+-p+now · · Score: 1

      I also very much doubt that Obj-C is more popular than either C# or PHP. And, yes, for sure JS should be higher than all of those (maybe except for PHP).

    41. Re:Yes but by terjeber · · Score: 1

      Writing a compiler that targets .NET IL (i.e. the knock off of java bytecode) doesn't make it less C# like

      This is correct.

      For example, Java has Clojure, which is functional and vert different from Java. But the compiler writer had to jump through hoops to get the clojure code compiled into something Java like.

      Interesting. The Java VM is essentially a stack-based execution environment, not fundamentally different from a CPU as such. I don't know why it would be significantly easier to translate Clojure to CPU instructions (which it has to end up at at the end of the day) than bytecode. I assume that it would be because Clojure typically runs on a very language-specific VM, and fitting it onto the JVM without adding the Clojure VM on top would be harder.

      Again, you claim that the CIL is C# centric. I would love to see an example. What specifically about this stack-based execution environment is C# centric?

    42. Re:Yes but by Anonymous Coward · · Score: 0

      You're an idiot. You don't know the first thing about .Net or Java.

    43. Re:Yes but by Galestar · · Score: 1

      Generally when making opinion statements it is nice to back them up with facts. Please provide facts that support your claim that C# usage is based on vendor lock-in. Seeing as how you can write Windows applications in C, C++, Java, Python, Ruby, Delphi, or about 100 other languages - there is no reason why C# is a must on Windows as Objective-C is a must on iOS.

      Either that or you're just talking out your ass.

      --
      AccountKiller
    44. Re:Yes but by gbjbaanb · · Score: 1

      you only need objective-c on Apple for some parts of the GUI. The rest can be written using plain old C. Compare this to using WPF on Windows.

      Don't forget the whole point was about vendor lock-in, C# is a Microsoft only technology that only works on Microsoft stuff (lets forget Mono for practical purposes), this is what give it it's lock-in - you don't *have* to use it to create apps on Windows (but you do if you're deploying to Windws phone for example) but if you do learn C# you're not going to be deploying to Mac. That's what lock-in is all about, once you've learned the Windows tech, you're now a Windows developer. Unlike C++ (say) where you are a general any-platform dev (that uses platform-specific libs).

      You don't even need to use objective-C for Mac development, Qt (for example) runs happily on the Mac, so perhaps you need to take your own advice about ass-talking.

    45. Re:Yes but by binarylarry · · Score: 1

      LOL! Your response is moronic on so many levels.

      Have fun hacking, kiddie!

      --
      Mod me down, my New Earth Global Warmingist friends!
    46. Re:Yes but by terjeber · · Score: 1

      So the answer to my question is that you have no clue? You can not provide a single example. I figured as much. When the religious nuts come screaming, there is no way to engage you in a rational debate. But thanks for proving that you are a clueless religious not.

    47. Re:Yes but by binarylarry · · Score: 1

      Cool story bro

      --
      Mod me down, my New Earth Global Warmingist friends!
    48. Re:Yes but by terjeber · · Score: 1

      QED

    49. Re:Yes but by Anonymous Coward · · Score: 0

      The grandparent was comparing .Net to Objective-C. Their was no mention of Java.

      Aside from the fact that this is absolutely true, one should perhaps also note that the native API in Android is in C, not Java. It is indeed possible to do an Android app in C (and many are), but Google's version of Java is the preferred and better documented choice.

      As for iOS, it's a Unix system.

  4. TIOBE? by Anonymous Coward · · Score: 0

    TIOBE Again??

  5. Method Syntax by Jackmon · · Score: 2

    Fine language in many ways but I call 'Boo' on the method syntax.

    1. Re:Method Syntax by kthreadd · · Score: 2

      I'm not doing anything in Objective-C but I actually like the method name syntax. Code becomes much easier to read and hardly any harder to write if written in a somewhat modern IDE with code completion.

    2. Re:Method Syntax by Jackmon · · Score: 3

      Here's my problem with it:

              -(void) what: (int) kind of: (int) bullshit isThis;

      IMO, that is very difficult to read. And try doing a multi-file search for calls to it.

      IDEs can overcome the search problem, but the readability problem remains.

    3. Re:Method Syntax by spongman · · Score: 3, Interesting

      agreed. when i look at obj-c code it feels like someone's pushing hot pins into my eyes.

      seriously.

      why have (c-style) syntax for declaring and accessing variables and functions, and a completely different syntax for declaring and accessing bound methods?

      it makes no sense. it doesn't add anything semantically to the language. it adds another syntax construct just for the sake of it. completely unnecessary.

      and why are properties accessed using c-style syntax, and not methods?

    4. Re:Method Syntax by Anonymous Coward · · Score: 0

      That doesn't seem like a fair example because no Obj-C programmer would write it that way. Seriously, what's so hard to read with:

      - (void) setMessage:(NSString*) message toQueue:(NSOperationQueue*) queue;

      When used, the syntax becomes
        [obj sendMessage:aMessage toQueue:mainQueue].

      Sure the brackets are a bit weird, but is it really that much worse than
      void sendMessageToQueue(NSString* message, NSOperationQueue* queue);
      obj.sendMessageToQueue(message, queue);

      You don't need to guess what each parameter's purpose is, making every method self documenting. It is verbose, but autocompletion in LLVM is quite good.

    5. Re:Method Syntax by spongman · · Score: 2

      but is it really that much worse than

      it's not really better or worse, it's just unnecessary.

      C already has a syntax for declaring and invoking functions, and it already has a syntax for accessing variables bound to instances of structs. why did they have to invent a completely new syntax for declaring and invoking functions bound to structs?

      if "struct.field" is ALREADY a way or accessing a struct's field, and "function()" is ALREADY a way of invoking a function, then why can't "struct.field()" be a way of invoking a function that is a field of a struct? it's not that much of a stretch.

    6. Re:Method Syntax by Cinder6 · · Score: 3, Informative

      Objective-C is a strict superset of C. Anything it adds over C has its own special syntax and notation, possibly to help reduce confusion. Properties didn't always use dot-notation--you used to have to do [object ivar] in order to access a member variable, and [object setIvar:ivar] to change it. The (relatively new) dot-notation and @property syntax is just shorthand for this functionality, and a welcome thing (though you can still use the old style).

      Objective-C used to have a lot of irritating things about it, but I think the language has really improved over the past couple years. Properties, auto-synthesizing, automatic garbage collection, fast enumeration, etc. have all made the language much better. Once I got past the odd messaging syntax, I really came to like it, and I have to wonder how much recent experience some of these vocal haters have with the language.

      --
      If you can't convince them, convict them.
    7. Re:Method Syntax by mehemiah · · Score: 1

      I agree, this is best duplicated with named arguments which C and C++ still don't have.

    8. Re:Method Syntax by mehemiah · · Score: 1

      think of it like an accessor that you call as a member variable. read method calls out loud, you'll see why named parameters are nice.

    9. Re:Method Syntax by Jackmon · · Score: 1

      I'm not against named arguments, but I hate the way they are delimited with space and colons. It would be readable if it were being used in a magazine article, but I find parsing its intent with my own eyes very difficult.

    10. Re:Method Syntax by MBCook · · Score: 0

      C already has a syntax for declaring and invoking functions, and it already has a syntax for accessing variables bound to instances of structs. why did they have to invent a completely new syntax for declaring and invoking functions bound to structs?

      Because you're not calling functions or accessing variables, you're invoking methods. The difference can be subtle, but it's important.

      --
      Comment forecast: Bits of genius surrounded by a sea of mediocrity.
    11. Re:Method Syntax by spongman · · Score: 1

      sure, the new semantics are useful and nice. my problem is with the syntax. there's no need to create a completely new syntax for method calls, and there's no need to require naming parameters at the call site; they should have just added optional named parameters to the existing function call syntax.

      for example:
      someFunction(value1, value2)
      myStruct.field
      myObject.method(value1, value2, optionalArg: value9);

      anything else is unnecessary

    12. Re:Method Syntax by spongman · · Score: 1

      The difference can be subtle

      seems artificial to me. after all, a method is just a bound function.

    13. Re:Method Syntax by Andreas+Mayer · · Score: 1

      automatic garbage collection

      Thankfully, garbage collection is deprecated. We have Automatic Reference Counting (ARC) now.

    14. Re:Method Syntax by spongman · · Score: 1

      ok, so they added dot-notation property access after the fact. why didn't they also add dot-notation method access while they were at it?

      i'm guessing they had a really good reason for adding the property access shortcut, probably something involving everybody telling them the old way sucked (see hot pins bit, above). and yet that pearl of wisdom didn't seem to make it as far as the method access syntax. shame.

    15. Re:Method Syntax by jcr · · Score: 1

      No, you're sending messages. The Obj-C runtime invokes the methods. That's the key to the power of languages like Obj-C and Smalltalk.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    16. Re:Method Syntax by spongman · · Score: 1

      does ARC handle cycles??

    17. Re:Method Syntax by Anonymous Coward · · Score: 0

      Because sending messages in Objective-C is a VERY different operation than calling a function. Very different operations should have very different syntax. It makes what is happening clear to the person reading the code.

    18. Re:Method Syntax by macshome · · Score: 1

      I find Obj-C very easy to read and understand, but that's probably because it's the first compiled language I've picked up.

      For a noob all that text is great and autocomplete makes it easy to type.

    19. Re:Method Syntax by macshome · · Score: 1

      Like jcr said, you aren't calling methods, you are sending messages to objects.

      Why on earth does it hurt to name the parameters when you send the message? You can look at the code and know exactly what it does. When you type the code autocomplete kicks in and you know exactly what the method of the class is expecting. It's not like this stuff is new, the basics are nearly 30 years old at this point.

      I mean if you really want to go crazy you could say that none of the languages are unnecessary. Why would you ever use a pointer when you could just go to the address in assembly?

    20. Re:Method Syntax by larry+bagina · · Score: 1
      If you want to call it that, call it that. But the binding is done at runtime, not at compile time. And it goes through the runtime system. If the method doesn't exist, it can be added on the fly. Or replaced on the fly. Or proxied to another computer. And if you send a message to a NULL object, it doesn't crash.

      [object function: parameter]
      is syntactic sugar for
      objc_sendMesg(object, @selector(function:), parameter)
      which is not the same thing as:
      object->function(object, parameter)

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    21. Re:Method Syntax by spongman · · Score: 1

      sending messages, shmending messages, banana-ing function blobulators.

      it's doesn't matter what you call it. it doesn't explain why there needs to be a completely different syntax for transferring control to a function that's bound to an object.

    22. Re:Method Syntax by spongman · · Score: 1

      Like jcr said, you aren't calling methods, you are sending messages to objects.

      and the difference is, exactly?

      look, you're writing down somewhere what you're currently doing, and then passing some arguments to a function somewhere else. you can call it 'calling a method', or you can call it 'sending messages to objects'. semantically it's exactly the same thing. and it doesn't require a new syntax.

      Why on earth does it hurt to name the parameters when you send the message?

      it doesn't hurt (except for the pins), it's just unnecessary. sure, allow me to it when i think it might help clarity, but don't force me to do it all the time...

      You can look at the code and know exactly what it does. When you type the code autocomplete kicks in and you know exactly what the method of the class is expecting. It's not like this stuff is new, the basics are nearly 30 years old at this point.

      right, so you need a decent IDE to make it not a pain in the ass to write. nice. it's my belief that forcing the programmer to express the mundane and repetitive does NOT increase readability, or quality. conversely, if you allow the programmer to reduce the mundane, and hilight the exceptional, or unexpected you're much more likely to draw attention to those things and not have them lost in the all the noise.

      I mean if you really want to go crazy you could say that none of the languages are unnecessary. Why would you ever use a pointer when you could just go to the address in assembly?

      you're missing the point. i'm not saying there shouldn't be a way of calling methods (or passing messages to objects, or whatever you want to call it). I'm saying there doesn't need to be a completely new syntax invented for doing it when the existing one could have been minimally extended to support the new semantic requirements. they could have easily added smalltalk semantics to C without trying to bolt one language as an embedded DSL inside another in some frankenstein-type abomination.

    23. Re:Method Syntax by jcr · · Score: 1

      When you learn the difference between sending messages and calling functions, you'll know why we use Obj-C.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    24. Re:Method Syntax by uglyduckling · · Score: 1

      There's actually quite a big difference between calling methods and sending messages. Take a look at this if you're not sure. It's not semantically equivalent, what is going on under the hood in Obj-C when a message is sent to an object is quite different to calling a method in C++.

    25. Re:Method Syntax by Anonymous Coward · · Score: 0

      Properties, auto-synthesizing, automatic garbage collection, fast enumeration, etc. have all made the language much better.

      It has automatic reference counting, not garbage collection.

    26. Re:Method Syntax by Anonymous Coward · · Score: 0

      does ARC handle cycles??

      Yes it does.
      Another example is the Cocoa framework, which recommends avoiding reference cycles by using "strong" (counted) references for "parent-to-child" references, and "weak" (non-counted) references for "child-to-parent" references.

    27. Re:Method Syntax by Anonymous Coward · · Score: 0

      I once thought like you, then I learned what sending a message means and what you can do with it as a result. It's not the same thing at all at the end of the day, same result most of the time, but a different way to get there. But those differences should require a new syntax.

      What I thought was weird was the way they overloaded the '.' for properties.

      in C

      struct foo {
      int bar
      };

      struct foo Foo;
      struct foo * FooPtr = /* all direct memory access */
      Foo.bar = 10; /* direct memory write to bar */
      FooPtr->bar = 10; /* dereference FooPtr, direct write to bar */
      int var = Foo.bar;

      in objc

      @interface foo : NSObject
      @property int bar;
      @end

      foo * Foo = [[foo alloc] init];
      Foo.bar = 10; /* is equivalent to calling [Foo setBar:10] */
      int var = Foo.bar; /*is equivalent to calling [Foo bar] */

      Obj-c is a complete superset of C, yet the "." has completely different meanings if Foo is c-style struct or Foo is an NSObject. Doesn't take long to get used to it, but it was something that I thought was a very weird choice.

    28. Re:Method Syntax by agrif · · Score: 1

      Personally, I like the fact that the Objective-C parts of the code look completely different than the C parts of the code.

      C++ tries really hard to look like a natural extension to C, and in some respects that's an admirable goal. Sometimes, though, it can be confusing. Consider the following bit of code:

      void test_func() { SomeObject obj; }

      In C, this function does nothing, and after a quick glance you'd be tempted to say it does nothing in C++ too. But in C++, declaring a variable calls its default constructor, which could actually do something. It looks like C, but it acts nothing like C.

      With Objective-C, you avoid the problem entirely because it looks nothing like C. You're never tempted to think "oh, I know how this works in C so it must work similarly here". You might not like it, but I happen to fall into this trap a lot, so I appreciate the syntax.

    29. Re:Method Syntax by Anonymous Coward · · Score: 0

      agreed. when i look at obj-c code it feels like someone's pushing hot pins into my eyes.

      I felt the same way for a long time, in face I quit writing software for the Mac for about 10 years because I never got over the learning curve with obj-c. About a year ago I forced myself to figure it out, and now I can't imagine going back to C++.

    30. Re:Method Syntax by cthulhu11 · · Score: 1

      I have to assume that in the intervening years the embarrassing flaws of the PPI/Stepstone implementations have been fixed, eg. failure to encapsulate identifiers scopes, three incompatible implementions of asciiFiler, etc.

    31. Re:Method Syntax by cthulhu11 · · Score: 1

      The answer is Brad.

    32. Re:Method Syntax by Anonymous Coward · · Score: 0

      You don't invoke a function, and you don't access struct fields. You are sending messages to objects. That's completely different.

    33. Re:Method Syntax by squiggleslash · · Score: 1

      It's a history thing. Objective C started off as a preprocessor that added some object oriented features to C. The different syntax made it easier to preprocess, as it made the "Objective" bit easy to find and parse.

      I just wish they'd finished the job. Is it me, or does Objective C feel like a language that would be really good if they weren't using C as a crutch to get around things it doesn't do, and wasn't dependent on C's memory model and all that entails to a degree that makes it hard for Objective C to do the things any modern language should do?

      --
      You are not alone. This is not normal. None of this is normal.
    34. Re:Method Syntax by Anonymous Coward · · Score: 0

      No, it actually has both, and you can decide which to use.

    35. Re:Method Syntax by spongman · · Score: 1

      There's actually quite a big difference between calling methods and sending messages

      popycock. it's a syntactical difference, nothing more.

      certainly, c++ and objective-c have different binding requirements, but that has absolutely no bearing on syntax. anyone who tells you different is just making excuses for bad decisions made long ago.

    36. Re:Method Syntax by spongman · · Score: 1

      does ARC handle cycles??

      Yes it does.

      huh? that's like saying malloc() doesn't leak, and free() is safe.

      in other-words, no, it doesn't.

    37. Re:Method Syntax by spongman · · Score: 1

      i fail to see what bearing the time/implementation of the binding has on the syntax.

      why cannot
      object->function(object, parameter)

      be the same thing as
      objc_sendMesg(object, @selector(function:), parameter)

      ?

      and don't get me started on the whole '.' / '->' thing for fields & properties.

    38. Re:Method Syntax by Anonymous Coward · · Score: 0

      Originally, the goal was merely to implement objects with structs; not to make all structs into objects. The initial implementation of Objective-C was basically a set of preprocessor macros and a small runtime for dynamic message passing.

      Today, dot syntax for getting and setting instance values in the object gives many folks part of what they want. myObject.life = 42; rather than [myObject setLife:42]; Either way works, but the former form indicates nothing special happens; and the latter is preferred when there's some special side effects or extra behavior that's invoked. It's just a stylistic choice today though.

      Why didn't they go whole hog and introduce a dot method syntax as well? There are two areas (remaining a superset of c and c++ syntax, and how to keep the verbose mult-part selector names) which were probably deemed more trouble than they were worth to try to resolve.

  6. Just another extension by aaaaaaargh! · · Score: 5, Insightful

    Look, I understand that people who use their tools daily want to advertise them and it's a goosd thing if you like what you're using, but let's face it: Objective-C is just another unsafe, hopelessly outdated extension of C as C++. It's great to get things done and sucks less than C++, but it's not in any way a modern language nor is it based on a great language design.

    Before people start flaming me, please consider that programming languages are tools and you choose the right tool for the right purpose and platform, and the availability of libraries is often more important than the language itself. There is no doubt that Objective-C has its place and is useful, just don't try to sell it as the latest great new thingy. Even Apple's own old Dylan was a more interesting and innovative as a language than Objective-C.

    My 2 cents. Now let the language flamewars commence.

    1. Re:Just another extension by Maury+Markowitz · · Score: 4, Interesting

      "Even Apple's own old Dylan was a more interesting and innovative as a language than Objective-C."

      Agreed. I loved the multi-interface stuff. Why doesn't anyone else pick that up? It would be particularly easy to implement in Bundles. But...

      "the availability of libraries is often more important than the language itself"

      Bingo. Lets be honest, is any native library set even *remotely* as good as Cocoa out of the box? With the exception of Delphi I've fiddled with them all, and the answer is a resounding "no!". All you have to do is compare the basic text editing widget across libraries and you can draw your own conclusions.

    2. Re:Just another extension by Anonymous Coward · · Score: 0

      You commenced them yourself, but were stupid/smart enough to contradict your first paragraph in your second, so now no one knows what to say.

      Yes, they are tools, and if you really have no idea what Objective-C's place is (hint: iPhone & Mac) you don't have enough breadth of experience to comment on this topic.

    3. Re:Just another extension by oh_my_080980980 · · Score: 0

      All the report does is start the marketshare for Objective-C. You went of on a rant. Perhaps you should take your own advice.

    4. Re:Just another extension by maccodemonkey · · Score: 4, Insightful

      Before people start flaming me, please consider that programming languages are tools and you choose the right tool for the right purpose and platform, and the availability of libraries is often more important than the language itself.

      Not only does Objective C have an extremely rich set of libraries from both Apple and the community (UIKit and Foundation are arguably the best mobile development APIs out there), but Objective C is compatible with all C and C++ libraries.

      So I'm not exactly sure what the point is. I suppose if you have to use a C library one could say "Well see, you have to use C anyway!". But at least for me, the important part is while I'm using C, I'm still encapsulating that code in Obj-C.

    5. Re:Just another extension by Anonymous Coward · · Score: 0

      You commenced them yourself, but were stupid/smart enough to contradict your first paragraph in your second, so now no one knows what to say.

      Yes, they are tools, and if you really have no idea what Objective-C's place is (hint: iPhone & Mac) you don't have enough breadth of experience to comment on this topic.

      Of course I know that Objective-C is used for Cocoa programming and you can safely assume that everyone on /. knows that. What kind of moron are you?

      Also, perhaps you should learn the actual meaning of terms like "contradiction" (hint: take an elementary logic course) before using them.

    6. Re:Just another extension by cpu6502 · · Score: 1

      Assembly.

      The "modern" Kolibri OS is written in assembly and fits on a floppy. Assembly is the way to go. Just kidding. WHAT do you recommend as a modern language we should all learn?

      --
      My AC stalker: " I personally agree with your posts most of the time, but that won't keep me from modding you troll"
    7. Re:Just another extension by Anonymous Coward · · Score: 0

      Why it it "not a modern language"? Why is C++ not a "modern language". Your comments smack that you're completely out of touch with the latest C and C++ standards.

      If you honestly believe C and C++ and not modern, I honestly believe you have no clue about the subject matter.

    8. Re:Just another extension by Arker · · Score: 2

      MMM Delphi.

      Now that brings back memories. Objective Pascal with Borland libraries. I hated high level languages back in those days, until I met Delphi.

      Borland is long gone, it would be cool if there were a free software clone out there to use though. It might even inspire me to try programming again sometime.

      --
      =-=-=-=-=-=-=-=-=-=-=-=-=-=-
      Friends don't let friends enable ecmascript.
    9. Re:Just another extension by PCM2 · · Score: 1

      Well, it's not free software and it's not even all that cheap, but there's always this.

      --
      Breakfast served all day!
    10. Re:Just another extension by pjabardo · · Score: 1

      I haven't used it but there is a Delphi clone: http://www.lazarus.freepascal.org/

      I read somewhere that .NET and C# were developed by the guy that developed Delphi.

    11. Re:Just another extension by phoenix_rizzen · · Score: 2

      You can still download Delphi and Kylix (the Linux/cross-platform version of Delphi) from various places around the Internet.

    12. Re:Just another extension by spongman · · Score: 2

      I read somewhere that .NET and C# were developed by the guy that developed Delphi.

      you mean Anders Hejlsberg?

    13. Re:Just another extension by Anonymous Coward · · Score: 1

      A C fanatic complains about C++'s safety? You shouldn't throw rocks if you live in a glass house.
      I've done some work on the memory manager of a niche operating system. It was completely developed in C and riddled with bugs. Most of those I found were directly caused by C's type system (and, arguably, the natural limits of human memory and attention). We converted bits to C++ and discovered bugs that we didn't even know were there. Unfortunately, we don't have the time nor the resources to convert everything as there is just too much of it.
      I don't care if you don't like object oriented programming. I don't care if you hate C++11. If you try it and stick to the things you did in C, you'll quickly discover that C++ is a better C than C ever was. Which shouldn't come as a surprise, since it's designers learned from the past.

    14. Re:Just another extension by scot4875 · · Score: 2

      Delphi lives on. It switched its base syntax from Pascal to C++, and is called C# now.

      --Jeremy

      --
      Jesus was a liberal
    15. Re:Just another extension by codepunk · · Score: 1

      lazarus.freepascal.org go forth and enjoy

      --


      Got Code?
    16. Re:Just another extension by mehemiah · · Score: 1

      python but that's probably not what you mean. If that's the case, any scripting language outside of php would count. If only scripting languages could come with a GUI package better than TK

    17. Re:Just another extension by aaaaaaargh! · · Score: 2

      My main point was basically yours, but in contrast to you I didn't really get my message across without waking up a bunch of programming language trolls. Wrong choice of words I guess. :-/

    18. Re:Just another extension by shutdown+-p+now · · Score: 1

      Lets be honest, is any native library set even *remotely* as good as Cocoa out of the box? With the exception of Delphi I've fiddled with them all, and the answer is a resounding "no!". All you have to do is compare the basic text editing widget across libraries and you can draw your own conclusions.

      I don't know what, exactly, you mean by "native" in this case, but assuming this is native code (as opposed to Java, .NET and the likes), what's wrong with Qt?

    19. Re:Just another extension by drkstr1 · · Score: 1

      Assembly.

      The "modern" Kolibri OS is written in assembly and fits on a floppy. Assembly is the way to go. Just kidding. WHAT do you recommend as a modern language we should all learn?

      HTML5! (sarcasm... mixed with a little vomit)

      --
      Fanboy Status: Apache Flex, C#, Eclipse, KDE, Pirate Party, Ron Paul, Slackware, Windows 7
    20. Re:Just another extension by cthulhu11 · · Score: 1

      How many people know that ICPak 201 was submitted to the OSF, losing to the bungle that was Motif?

  7. This Trend is Interesting by Anonymous Coward · · Score: 0

    This trend is interesting because it kind of dovetails with the fact that fewer and fewer developers are choosing GNU-based/FOSS licenses for their work -- this and the fact that iOS is attracting developers in droves away from pure FOSS pursuits. While Linux and FOSS are interesting and while I do use quite a bit of it, at least iOS is not balkanized. Walled-in garden, whatever. It just works the vast majority of the time and Sally Secretary could give a damn about software license politics -- and that's what they are. The four freedoms are nice, but in the real world, no one but the zealots cares. And even if you do care, if you're not a coder with mad skills, you cannot do anything anyway. That's like saying "yeah, you can buy this Ferrari -- if you have the $250,000 it takes."

    I've been in IT now for 15 years and there have been maybe two times where the license issue matered and that was simply because I needed to install a single piece of software on about 30 machines. I chose a FOSS solution because of fiscal concerns.

    iOS, Objective-C and Clang are now the interesting bets.

    1. Re:This Trend is Interesting by Electricity+Likes+Me · · Score: 4, Insightful

      This seems more likely to be due to the easy money currently seeming to be in iOS apps. It's a big installed base, there's a delivery system, and the consumers have been trained to expect to pay some money for just about everything on it (whereas the usefulness of free 'droid apps generally seems to be way higher - in my, admittedly limited, experience).

      I mean, if you have an idea, then the thing you want to do is try and get a few hundred thousand people to buy it for a $1, so that's what everyone is currently doing. I don't think it really says anything beyond that.

    2. Re:This Trend is Interesting by Anonymous Coward · · Score: 1

      You might be right -- in fact, I think money is the lion's share of the reasons why people are moving to develop for iOS. Look at the guys who wrote Angry Birds. They went from obscure guys in the EU to millionaires overnight with royalties on products from posters, plush toys, t-shirts, et al. Developers see themselves as they next big thing.

    3. Re:This Trend is Interesting by gwking · · Score: 3, Interesting

      I find Android apps are not nearly as useful as similar iOS apps. They are usually slower, uglier, and buggier - free or not.

      Given the choice between a free Android app that is a turd, and a great iOS app that costs $1, I'll gladly pay the $1.

      Also, for developers, I think there is more to it than just the money. With iOS you can test a reasonable amount of the devices on the market and the screen sizes they use. With Android? Not unless you happen to have a few hundred Android devices kicking around and a few months to test your app on all of them. Take into account the absolutely terrible hardware on the currently selling low end Androids that can barely keep up with the iPhone 3GS, the problems with having an app on the SD card instead of on the builtin memory, and then all screen sizes and aspect rations. Ugh.

    4. Re:This Trend is Interesting by Anonymous Coward · · Score: 0

      Hipster Barrista, is that you? Typical iPhone snob response.

    5. Re:This Trend is Interesting by Anonymous Coward · · Score: 0

      I find Android apps are not nearly as useful as similar iOS apps. They are usually slower, uglier, and buggier - free or not.

      True. They also update more often, have less restrictions and are closer to how I use my computer which I like a lot more than my phone.

      Given the choice between a free Android app that is a turd, and a great iOS app that costs $1, I'll gladly pay the $1.

      Good. Software is difficult to make money at. Please support us no matter what market you choice is!.

      Also, for developers, I think there is more to it than just the money. With iOS you can test a reasonable amount of the devices on the market and the screen sizes they use. With Android? Not unless you happen to have a few hundred Android devices kicking around and a few months to test your app on all of them. Take into account the absolutely terrible hardware on the currently selling low end Androids that can barely keep up with the iPhone 3GS, the problems with having an app on the SD card instead of on the builtin memory, and then all screen sizes and aspect rations. Ugh.

      Also true. This said the computer also has many variations and all of these phone platforms are new versions of our modern computer replacement. They are all also very young operating systems dealing with very new real world problems and technologies (touch, GPS, etc ...) and they all have their own solutions slowly coming in to play to deal with device variations.

      Of all places I would expect Slashdot to understand this more and embrace the more developer friendly future. Put simply I can make an Android application on any operating system I choice almost (I am) but there is only one place I can go to even start to work on an iPhony.

    6. Re:This Trend is Interesting by muridae · · Score: 1

      Given the choice between a free ... app that is a turd, and a great ... app that costs $1, I'll gladly pay the $1.

      Funny, I don't think that sentiment has anything to do with the OS that the app is running on.

  8. TIOBE Index by PCM2 · · Score: 5, Insightful

    Seems like every few weeks someone writes another story about the amazing "trends" in the TIOBE Index. As far as I can see, the real trend is: Languages go up in popularity, they go down, they move around, one month it's the First! Time! Ever! that a language has made the list, the next month it's gone again, and C, C++, and Java are always at the top (in varying order). Such variable results suggest that TIOBE's sampling method isn't all that reliable or accurate to begin with, but I think we all have a pretty good idea what languages people are really using and for what.

    --
    Breakfast served all day!
    1. Re:TIOBE Index by cpu6502 · · Score: 2

      Thanks for giving clarity. If we went by popularity, we'd all be listening to Rihanna or Gotye (both hit #1) or watching FOX (#1 on cable, #2 on broadcast) or reading Alex Jones infowars.com (routinely 1 or 2 in the webnews index). Popularity is interesting to note but doesn't mean much otherwise.

      --
      My AC stalker: " I personally agree with your posts most of the time, but that won't keep me from modding you troll"
    2. Re:TIOBE Index by jpapon · · Score: 1

      Hey! Gotye isn't THAT bad... Someone I used to know is pretty catchy.

      --
      -- Let us endeavor so to live that when we pass even the undertaker shall be sorry. -- M. Twain
    3. Re:TIOBE Index by Anonymous Coward · · Score: 1

      TIOBE is simply running various google searches, e.g. "java programming", and recording the result count.

      But, if you try this from three different computers on three different days, Google will give you three different numbers because their indexes are never in a constant state. Also, this is probably heavily biased towards student or newbie programming questions.

      Plus things like Javascript declining in popularity 2009-2011 simply don't reflect the real world.

    4. Re:TIOBE Index by Xest · · Score: 1

      "Such variable results suggest that TIOBE's sampling method isn't all that reliable or accurate to begin with, but I think we all have a pretty good idea what languages people are really using and for what."

      They state their methodology on their own site and it's a complete joke, it goes something like this:

      A language has to be both Turing complete and have an article on Wikipedia to be considered.

      Data is then gathered by simply searching the top 8 searchable sites on the net and results are weighted by order, which from their own page gives:

      Google: 30%
      Blogger: 30%
      Wikipedia: 15%
      YouTube: 9%
      Baidu: 6%
      Yahoo!: 3%
      Bing: 3%
      Amazon: 3%

      The figure used from the search results is simply the number of page hits, so articles on blogger such as "Objective C is a terrible language and I'll never use it" would have a 30% weighting towards a hit for Objective C being more popular for example.

      But if this wasn't bad enough the queries they use then have arbitrary exceptions and groupings, they list these on their site and it doesn't take more than a second to see how some of the groupings and exceptions are far from incomplete or blatantly flawed.

      Then to make things worse they also apply a completely arbitrary, human decided confidence factor to each language, so say they assume searches for C++ are only 90% accurate they apply a 90% accuracy factor. They list the confidence factors on their site but don't explain the methodology for choosing them. Again it doesn't take a second to see how flawed their confidence factors are.

      Their methodology description is here:

      http://www.tiobe.com/index.php/content/paperinfo/tpci/tpci_definition.htm

      The fact they're a company that needs to make money, and the fact their methodology is so fundamentally flawed and so terribly arbitrary means that if anyone takes anything from TIOBE has to be pretty damn retarded.

      The fact that the 2nd - 4th place weighted sites they use (Blogger, Wikipedia, YouTube) are entirely based on user generated content and account for 54% of their weighting, with Google if you're good at SEO taking that up to 84% of the weighting means that it should be pretty easy for a single motivated individual to troll TIOBE's rankings. A few extra blogger accounts and postings coupled with a few insertions into Wikipedia whose search includes discussions not just democratically decided valid content and a few YouTube videos is probably enough to completely sway some of the languages standings quite dramatically I suspect. If anyone is bored then it may be a worthwhile experiment - see if you can pump some arbitrary language you've never even heard of into the top 20 or something!

      I've said it before a thousand times but it often gets drowned out in the ever growing amounts of idiocy that are poisoning Slashdot but if you want a more realistic picture of languages that are popular - particularly in terms of what you should learn from a career point of view, then you're far better off just searching job sites, or using sites like Stack Overflow, just don't be suprised when what people are REALLY using is completely different to what TIOBE likes to pretend people are using. Hint: Employers are far and away still looking more for Java, C#, C++, and PHP developers than anything else - iOS development might be growing but it's still only a small fragment of the amount of development going on out there - server side stuff, web stuff, business desktop front ends, university teaching, open source - the fraction of this sort of development being done in Objective C is negligible and this accounts for far and away the majority of development that's done in the world.

      I work fo

    5. Re:TIOBE Index by PCM2 · · Score: 1

      Christ, the index still to this day lists C as number one, but good luck finding anywhere close to the number of classic C jobs out there as there are say, Java, .NET, and PHP jobs, or even C++ jobs for that matter.

      I wonder about that. I think there probably are more straight C jobs than you realize (mainly in embedded systems and vertical industries more than mainstream "put an ad on Craigslist" type jobs), but I suspect it really has more to do with C being a sort of "foundational" language, so you have lots and lots of students searching for info about it. Then again, the Linux kernel is all C, as is PHP itself. C is hardly dying out. But I wonder how many people really still use it as their main, go-to tool.

      --
      Breakfast served all day!
    6. Re:TIOBE Index by Xest · · Score: 1

      You can see how flawed the methodology used by TIOBE it is for yourself - search for C Programming which is the term they use in Wikipedia (their 3rd ranked site) and on the first page alone there's only 3 or 4 matches actually related to C programming - the rest are actually other languages - C sharp, C++, Objective C, BCPL, so effectively even their 3rd ranked site is grossly incorrect even on their first page of searches where only about 10% of the results or whatever are actually for the result they're claiming 100% of results are for. I doubt Google and Blogger's search are any better, at least after the first couple of pages of results.

  9. BARF! by Anonymous Coward · · Score: 0, Informative

    And I mean extreme barfing! A terrible language with terrible syntax, semantics, and protocols.

    What a waste of time for programmers everywhere!

    1. Re:BARF! by Anonymous Coward · · Score: 0

      add to that a terrible tools/ide (xcode) and bunch of 'designers' who doesn't care about code readability or usefulnes, as long as 'app' looks good.

    2. Re:BARF! by kthreadd · · Score: 1

      So use Vim then. Nothing stops you. aptitude install gnustep-devel and start working.

  10. NeXTStep the grand-daddy of all that is now OS X by cpu6502 · · Score: 1, Insightful

    Don't you mean the "daddy" of OS X? I thought OS X *is* the Next OS but overlaid with the Mac desktop.

    Also why is it called iOS Objective C? Is objective-C only available through Apple?

    --
    My AC stalker: " I personally agree with your posts most of the time, but that won't keep me from modding you troll"
  11. Seems like Mac is a win ... by Anonymous Coward · · Score: 1

    Where's XCode for non-Mac? Not everyone wants to get $500 in redundant hardware to run software.

    You save $500 on hardware but spend $500 on Microsoft Visual Studio Pro. So its a wash. However when you consider that the hardware lets you dual boot Mac OS X or Microsoft Windows the Mac seems like a win. Especially when you consider Mac OS X offers you a really nice Unix environment if one is so inclined.

    1. Re:Seems like Mac is a win ... by VGPowerlord · · Score: 1

      You save $500 on hardware but spend $500 on Microsoft Visual Studio Pro. So its a wash. However when you consider that the hardware lets you dual boot Mac OS X or Microsoft Windows the Mac seems like a win. Especially when you consider Mac OS X offers you a really nice Unix environment if one is so inclined.

      I do? You mean I'm not supposed to download it from my work MSDN account for my personal use? :P

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    2. Re:Seems like Mac is a win ... by Anonymous Coward · · Score: 1

      You know, or get the Express version that does everything a hobbyist needs for free.

    3. Re:Seems like Mac is a win ... by Anonymous Coward · · Score: 3, Informative

      You know, or get the Express version that does everything a hobbyist needs for free.

      Emphasize hobbyist, actually only some hobbyists. No 64-bit code for Express. No Microsoft Foundation Classes, MFC really simplifies Windows use interface coding and it is very commonly used in Windows apps. No profile guided optimization. No remote debugging. No resource editors.

    4. Re:Seems like Mac is a win ... by Anonymous Coward · · Score: 0

      Express would not be the equivalent version with respect to Xcode. Pro would be the corresponding version.

    5. Re:Seems like Mac is a win ... by Gerald · · Score: 1

      No static analysis. No redistributable CRT.

    6. Re:Seems like Mac is a win ... by ulski · · Score: 3, Informative

      you are not 100% correct there. 64-bit tools are not available on Visual C++ Express by default. To enable 64-bit tools on Visual C++ Express, install the Windows Software Development Kit (SDK) in addition to Visual C++ Express.

    7. Re:Seems like Mac is a win ... by terjeber · · Score: 1

      Why do you need Visual Studio Pro? For most apps, Express is plenty. And free. As in beer.

    8. Re:Seems like Mac is a win ... by terjeber · · Score: 1

      Most of what is not on Express is C++ related. For C#, Express is mostly OK. Couple with Git and a few other things, and you have a nice environment. I could not live without remote debugging, but most developers can.

    9. Re:Seems like Mac is a win ... by osu-neko · · Score: 1

      MFC really simplifies Windows use interface coding...

      Pull the other one, it's got bells on it!

      --
      "Convictions are more dangerous enemies of truth than lies."
    10. Re:Seems like Mac is a win ... by coredog64 · · Score: 1

      No 64-bit code for Express

      Because it would be too difficult for a C# programmer to edit an XML file and call msbuild.

      There are rational digs against the express versions, but this ain't one of 'em.

    11. Re:Seems like Mac is a win ... by shutdown+-p+now · · Score: 2

      No Microsoft Foundation Classes, MFC really simplifies Windows use interface coding

      As someone with past MFC experience (years ago, thankfully), there's precisely one thing that it really simplifies, and that's gouging one's eyes out - you'll be adept at it after a few months.

      Anyway, the OP was talking about C#, not C++, so MFC is largely irrelevant.

    12. Re:Seems like Mac is a win ... by Anonymous Coward · · Score: 1

      If you're using C++ the Express edition won't allow you to do MFC development. Not sure about the native compilers not targeting x64, but the .NET languages have AnyCPU which will let your code execute in x64.

      PGO and Remote Debugging doesn't sound very "Express" to me. We have MSDN subscriptions at work (our app is 300K SLOC C++/MFC) and I don't use the remote debugger, memory dumps serve me fine (and are easier for our customer support to get).

      Not sure I've ever really used a resource editor other than for dialogs. The Express edition doesn't have any limitations on the .NET resource editors, as far as I know.

      So if you're using Express for C++ it's plenty enough for learning, simple Win32 development, and even a bit more (pretty sure SDL compiles fine).

      If you're using Express for .NET development it is plenty enough for pretty much anything.

    13. Re:Seems like Mac is a win ... by gbjbaanb · · Score: 0

      MFC is really easy - to do a bit of GUI it's very simple to add 1 variable, 1 line of DDX macro and 1 line entry in the resource file. That gives you a GUI control, a variable to bind to it and binding between the 2. It really is very simple and straightforward, though it may not be the best and Microsoft quite happily made a lot of complexity available if you can't keep your code simple.

      Compare that to WPF - big lump of XML, new class with member variables and properties to access them, and horrible binding expression to tie the two together, plus a bunch of IPropertyChangeNotification implementations.

    14. Re:Seems like Mac is a win ... by 19thNervousBreakdown · · Score: 1

      I only work with the full version so I don't know this, but can you debug 64-bit code that way too?

      --
      <xml><I><am><so><damn>Web 2.0</damn></so></am></I></xml>
    15. Re:Seems like Mac is a win ... by Anonymous Coward · · Score: 0

      A lot of this isn't really true in 2010 anymore - most of the compiler limits go away if you install the platform SDK on top (why you have to jump through this hoop instead of it just being integrated by default I have no idea). This also gets you static code analysis and a lot of the other more expensive edition features.

      PGO is hardly a hobbyist feature.

      The biggest issues IMO at least are the MFC/ATL libraries and lack of IDE plugin support.

  12. FTFY by mveloso · · Score: 2

    Look, I understand that people who use their tools daily want to advertise them and it's a good thing if you like what you're using, but let's face it: C is just another unsafe, hopelessly outdated extension of assembly. It's great to get things done and sucks less than fortran, but it's not in any way a modern language nor is it based on a great language design.

  13. Well done microsoft by Anonymous Coward · · Score: 0

    Microsoft's previous pronunciations on the future of windows programming (all HTML 5, no place for .Net) has driven people away from C#. Look at the graph details and they match with the initial platform announcements on Windows 8. Uncanny.

    Messaging has never been their strong suit.

    1. Re:Well done microsoft by Anonymous Coward · · Score: 0

      C# is only shrinking in relative numbers to HTML5. Just like how people say "the PC is dying". It's not dying, it's just not growing nearly as fast or has as large of a potential market as tablets+smartphones.

  14. Re:bonch is a corporate shill for Apple by X0563511 · · Score: 1

    What the fuck does this have to do with Apple?

    --
    For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
  15. Re:bonch is a corporate shill for Apple by Anonymous Coward · · Score: 0

    You are delusional. You see shills everywhere. You accuse everyone who says anything good about Apple or Microsoft of being a shill. You have called Mac/iPhone developers Microsoft shills when they fairly point out something Microsoft did right.

    You are just a cyber-stalker with a hard on for a couple of posters. You are not a crusader. You are just a silly spammer with a weird hobby. Get over yourself.

  16. How is it not modern? Obj-C has modern libs... by SuperKendall · · Score: 5, Insightful

    Objective-C is just another unsafe, hopelessly outdated extension of C as C++.

    Why do you claim it is "unsafe"? Almost all work done in Objective-C is very "safe", by any measure - mostly you are never using C arrays or the like. Just because they are there does not make the language inherently "unsafe" if that's not how real people use the language.

    consider that programming languages are tools and you choose the right tool for the right purpose and platform, and the availability of libraries is often more important than the language itself.

    Objective-C currently has some of the most advanced libraries for any platform. It already had great string support and other strong frameworks even before iOS, but with iOS and the Mac taking off the framework support for really advanced animations, database work, networking, etc. as good as or better than any other platform. I came from a Java world and am missing nothing for libraries... not to mention a really good set of open source libraries that offer other abilities in addition to the core frameworks.

    In fact, I would go so far as to say the range and quality of design of the frameworks are THE reason to use Objective-C.

    People like you just look at when Objective-C was developed and think because of its age it cannot be "modern". What you don't realize is that Objective-C was developing over all that time, just in a fairly parallel path to other languages - I like to refer to it as a "Steampunk" language. It is modern but just not quite the same as other things you are used to, coming from an alternate reality.

    You're going to have to come up with real reasons for Objective-C not being "modern", most of which are probably quite out of date by now. Before we can flame you, there need to be specifics which we can skewer...

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  17. ObjC sucks by dbrueck · · Score: 5, Informative

    I dev in ObjC on iOS almost every day, and the language sucks. I think it sucks less than C++, but I'm not sure that says much. The Xcode IDE (which also sucks) and the bolted-on features help, but overall the language hasn't aged as well as plain old C - i.e. while coding in it, you are constantly reminded that it is not a modern programming language. Anytime a language gets in your way, it's a bad thing, and that happens an awful lot with ObjC.

    (And before the flames start: yes, I fully recognize that nobody is forcing me to dev for the iOS platform, it's a choice I've made because I make gobs of money off of it. But that doesn't make ObjC suck any less, it just makes me willing to tolerate the suck and grumble about it on /.)

    1. Re:ObjC sucks by Anonymous Coward · · Score: 0

      And before the flames start: yes, I fully recognize that nobody is forcing me to dev for the iOS platform

      Actually, the flame I was thinking of was that you made a hard hitting critique without any examples to back it up.

    2. Re:ObjC sucks by pauljlucas · · Score: 2

      I dev in ObjC on iOS almost every day, and the language sucks.

      Please give examples why.

      --
      If you reply, do so only to what I explicitly wrote. If I didn't write it, don't assume or infer it.
    3. Re:ObjC sucks by dbrueck · · Score: 5, Informative

      Here's a few off the top of my head. Some of them may be specific to Cocoa, but I'm pretty sure that even those are rooted in ObjC's "features":

      Method signatures are often ridiculously long (see NSBitmapRep's initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel: method)

      Parameter names in method calls are /always/ named. You can't just say obj.someMethod(x,y). It's always [obj someMethodForX:x y:y].

      The above combine to make even the most basic operations tedious. Want to trim leading/trailing whitespace off a string? Enjoy [someString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]

      Immutable arrays, dictionaries, sets, strings. I get it, it can be useful for performance to know something is immutable (maybe, I'm not that convinced). But the common use case is most certainly mutable, so /that/ should be the default, e.g. NSArray should be mutable and then if needed there can exist some NSImmutableArray or something. But no, they did it the other way around.

      Memory management (up until recently) was neither fully manual nor fully automatic and ownership was based on naming conventions

      Being a superset of C, they couldn't provide an object-oriented array class using the normal array syntax, so instead you have tedium like [myArray objectAtIndex:2]

      Ditto for strings. Also, you have to prefix string constants with '@'.

      Similarly, you can't put "plain" objects into arrays, e.g. [myArray addObject:5] won't work, but [myArray addObject:[NSNumber numberWithInt:5]] will.

      And of course you can't just create an array with ['a', 'b', 'c'] but instead have to do [NSArray arrayWithObjects:@"a", @"b", @"c", nil].

      Backwards conventions like [NSDictionary dictionaryWithObjectsAndKeys:@"value0", @"key0", @"value1", @"key1", nil];

      If I'm going to pay the dev cycle price of a compiled language, it should catch stuff like non-existent selectors at compile time instead of blowing up at runtime

      Stack traces from delayed selector calls have zero contextual information

      The single inheritance model and a strict class hierarchy discourages writing reusable code. For example, if I have an app that runs on iPad and iPhone and they share a common screen (from the user's perspective although the layout/design might be significantly different), it's a real task to write a common parent class holds the common code.

      Many violations of don't-repeat-yourself: if you want to have an object with properties like Foo.title, then the code is roughly:

      @interface Foo
      {
          NSString *title;
      }

      @property (nonatomic, retain) NSString *title;
      @end

      @implementation Foo
      @synthesize title
      -(void)dealloc
      {
          [title release];
          [super dealloc];
      }

      Similarly, there's no way to have a truly dynamic object with a clean syntax, e.g. in Python/ruby/js/and a host of others you could have a quick little object you use to pass state around, kind of like a struct that has its members added on the fly, e.g.: x = new Object() ; x.name = 'dave' ; x.age = 3. There is literally no way to do that in ObjC - the best you can do is create mutable dictionary and use its verbose syntax.

      We could have a whole extra thread about the toolchain (Interface Builder is an abomination, Xcode often pegs multiple CPUs when it's just sitting there, if you kill the simulator instead of stopping the app via Xcode then you often have to reboot your host machine before you can run the simulator again) but I digress.

    4. Re:ObjC sucks by dbrueck · · Score: 1

      Fair enough - see above. Also Googling will reveal lots of people with Objc-hate. :)

    5. Re:ObjC sucks by maccodemonkey · · Score: 5, Informative

      About half of these have been fixed (and were actually new problems that didn't exist in Objc-1.0). Obj-C 2.0 introduced some of the "don't repeat yourself" issues with things like properties and consistency issues between the new property syntax and the existing syntax, but with the new LLVM you can just declare properties and not have to synthesize. In addition, ARC takes care of the memory management code. New LLVM also has Obj-C constants which take care of things like your dictionary example. You haven't needed a backing ivar, so that NSString *title; line in the interface can go.

      (Your code is also in bad form. You shouldn't do [title release]. It should be self.title=nil. Much cleaner, and you get the same thing without doing a roundabout around the property. You also clear the reference to reduce any chance of accidentally hitting a dealloc'd object.)

      As far as complaining about method names... That seems like a personal taste thing... And honestly, it's considered good form to have long method names these days, because the method names themselves become the comments, and it makes extremely clear exactly what the method does. And autocomplete should keep you from having to type out the entire method. There's been a lot of coding standards material written on why this is a good thing. You may not like it, but it seems like a majority of people actually do, and if you're writing APIs or classes, people aren't going to like short method names very much. Writing long method and variable names that describe exactly what they do was one of the first pieces of advice I got in my programming career, and it's served me very well.

      It's actually one of my biggest pet peeves when a C developer starts writing Obj-C stuff. They use these short, truncated method names for no apparent reason, when a longer name will reduce confusion when the code is shared. (And making your code reusable is one of the tenants of Obj-C for very good efficiency reasons.)

      As far as XCode, yeah, it sucks. We all know it. But every IDE has it's quarks. Eclipse is slow and also somewhat unstable, and Visual Studio has it's own quarks. There has been a lot of pressure on Apple to make XCode better, and indeed each release seems to be more and more stable, with 4.0 being the low point.

      Honestly, from your example code, it certainly looks like you've worked with Obj-C, but it doesn't look like you really had a strong understanding of it. Not that I don't blame you, with Obj-C 2.0 it became a little harder to understand, but Apple is cleaning that up.

    6. Re:ObjC sucks by Anonymous Coward · · Score: 0

      I'm always surprised by these "hasn't aged as well as plain old C". How, for a language where you can write plain old C? Do extra features degrade whatever was first there? Is OOP progamming a negative on the total?

    7. Re:ObjC sucks by dbrueck · · Score: 1

      Honestly, from your example code, it certainly looks like you've worked with Obj-C, but it doesn't look like you really had a strong understanding of it. Not that I don't blame you, with Obj-C 2.0 it became a little harder to understand, but Apple is cleaning that up.

      LOL, you deduced that from a couple of lines of code hurriedly typed into a web form? Gimme a break. I could just as easily say something like, "based on your reply, it looks like you've worked with Obj-C, but not much else; you haven't been exposed to enough development to see the weaknesses in your language of choice or appreciate the value of the alternatives." (I'm not saying this is the case, but see how it comes across?)

      Thanks for your reply though.

    8. Re:ObjC sucks by dbrueck · · Score: 1

      In my mind it's two-fold, really:

      - Maybe it's a generational thing for languages, but once you take OOP features onto C in an attempt to modernize it, then you naturally are going to think about using it in places where you would use some higher level, more modern language, or at least compare it to the features of higher level, more modern languages. In this respect ObjC falls down, and IMO, rather badly. Then again, C++ does too, so I guess it's in good company. There are so many other choices out there that don't get in the way as much. This may sound goofy, but C is just C - it's not pretentious and pretending to be a Java or a C# or whatever. It's just C and so going into it you just approach development a little differently, and that approach has worked pretty well and remained steady for the past 25 years (probably longer, but I don't have any experience with it farther back).

      - Most development - in any language - involves more than just the language. It's also using a standard library and any number of add on libraries. I'm fairly confident that a relatively small number of people use ObjC outside of Cocoa on iOS and Mac OS X, and even fewer outside of the group of people that use either Cocoa or GNUstep or whatever it's called. Because those libraries are written to use e.g. the ObjC message sending syntax and object life cycle semantics, in practice if you use ObjC then you are very likely going to be using the ObjC language features (i.e. the fact that you /could/ write your app all in straight C is irrelevant since (a) you couldn't call the Cocoa libraries and (b) if you did that, you wouldn't be using ObjC probably anyway). So, yes, the extra features /do/ in fact degrade what was there in the first place. A classic example would be an array. If you took all of the ObjC programs out there and looked at all the cases where arrays were used, I'm willing to bet that the overwhelming majority of the cases don't use a C array but instead use an NSArray. The latter is somewhat more powerful but unfortunately incredibly cumbersome to use relative to a good ol' C array. In theory the old C array is there, but in practice it largely isn't.

    9. Re:ObjC sucks by jsdcnet · · Score: 1

      If I'm going to pay the dev cycle price of a compiled language, it should catch stuff like non-existent selectors at compile time instead of blowing up at runtime

      You should know better. Obj-C is dynamic, you can create selectors at runtime.

      --
      no longer working for cnet
    10. Re:ObjC sucks by maccodemonkey · · Score: 1

      Honestly, from your example code, it certainly looks like you've worked with Obj-C, but it doesn't look like you really had a strong understanding of it. Not that I don't blame you, with Obj-C 2.0 it became a little harder to understand, but Apple is cleaning that up.

      LOL, you deduced that from a couple of lines of code hurriedly typed into a web form? Gimme a break. I could just as easily say something like, "based on your reply, it looks like you've worked with Obj-C, but not much else; you haven't been exposed to enough development to see the weaknesses in your language of choice or appreciate the value of the alternatives." (I'm not saying this is the case, but see how it comes across?)

      Thanks for your reply though.

      Well, you're critiquing the language, so yes, I'm assuming that you're actually writing out something well reasoned. I mean, we're talking about an example where you are pointing out Objective C's redundancy by writing out needlessly redundant code, so yes, I thought it was fair. Otherwise you're just trolling.

    11. Re:ObjC sucks by dbrueck · · Score: 1

      That's irrelevant - the compiler could at least issue a warning when you're using the selector literal syntax. It's no different than the compiler issuing a warning when you send a message to an object using a selector that may not exist even though that too could be valid at runtime.

    12. Re:ObjC sucks by mehemiah · · Score: 1

      third time this post that I've wanted to say, "get a real text editor" what r u using TextEdit I'm actually having trouble coming up with names of text editors that DON'T have text completion in them?

    13. Re:ObjC sucks by dbrueck · · Score: 1

      Well, I think the point still stands, especially considering that the code for that example is split across two files (the .h and the .m) - i.e. the language is needlessly verbose even with a few minor improvements (i.e. not using self.title= doesn't reduce the number of lines of code, for example, and not needing a backing ivar chops off a couple of lines, but it glosses over the large point of why on earth any of that should be needed in the first place. It's 2012 for crying out loud.).

      That's great that it can be less redundant now, but going from 4 mentions of a variable to 2 or 3 just before you can do anything with it means the developer is still doing stuff for the language, and not the other way around - i.e. the language design flaw remains, even if partially covered by a band-aid. And I think that kind of gets to the larger issue: given that there are so many available languages today, I'd rather choose something that is fundamentally cleaner over one that has a bunch of junk bolted on in an attempt to keep the language relevant.

    14. Re:ObjC sucks by dbrueck · · Score: 1

      It's more than just text completion: you have to remember enough to even get started. I've been programming in ObjC for years and sometimes still have a Monday morning brain fart trying to remember stuff, especially if I'm working on a project that involves hopping between multiple programming languages. Want to split a string into its comma-separated parts? Is it 'parts'? 'items'? Ah, no, it's [NSArray componentsSeparatedByString:].

      As implied above, if you're writing in ObjC then most likely you're writing for Mac/iOS (I'm ignoring the sliver of people using GNUstep). Every 8 or 9 months I try ditching Xcode (I use Vim for all other development) and even once you get the autocompletion set up for Cocoa (not an easy task), it never works quite right.

      One other thing to keep in mind is that the interaction for autocompletion in ObjC isn't the same as what you'd find in e.g. C, there are a few additional wrinkles. For example, if a parameter is actually a message send to another object (e.g. [foo call:[otherObj bar]]) and you don't put that 2nd bracket in there, the code completer often gets confused and puts it in the wrong place. Moving between parameters is a bigger visual jump since every parameter is named. There are a few things like this that make autocompletion a much more complex experience for the developer than what you'd find in other languages. Is it a huge burden? No, but it's just one more layer of annoying.

    15. Re:ObjC sucks by iluvcapra · · Score: 1

      A "warning" is warranted when something is "not inherently erroneous but that are risky or suggest there may have been an error." Creating a literal selector with @selector absolutely wouldn't justify a warning, and neither would creating a selector on an object with NSSelectorFromString(), nor would creating or redirecting a selector with class_respondsToSelector() or class_replaceMethod(). What you're proposing would break isa-swizzling and Objective-C's most powerful polymorphism mechanism.

      Objects don't know if they respond to a selector, any selector, until they're hit with them, and even then they might have to break the selector into a string and decode what it's asking for, that's how key-value coding works on unsynthed properties, after all.

      I think you're problem is you think Objective-C is object-oriented. It's not, it's class-oriented, with support for many object-oriented idioms.

      --
      Don't blame me, I voted for Baltar.
    16. Re:ObjC sucks by iluvcapra · · Score: 1

      ...It would break would break isa-swizzling, and it would make any non-trivial use of NSProxy or NSInvocation an error.

      --
      Don't blame me, I voted for Baltar.
    17. Re:ObjC sucks by maccodemonkey · · Score: 1

      Technically these days you just need one thing, the @property. You don't need anything else. Hard to get less redundant than one definition.

      On iOS, you never need the ivar that you put in, so that's needlessly redundant. That's user error, not a language issue. That reduces you to three required references at worst. The property, the synthesize, and the dealloc reference. New LLVM makes the synthesize go away, older LLVM with ARC killed the dealloc reference. So these days you're down to 1 line of code.

      Under Obj-C 1.0 it would have been two, the ivar, and the dealloc.

      Like I said, you don't seem to have a firm understanding, which is kind of dangerous when critique a language that you don't really know. I took two years of Spanish in high school, doesn't put me in a position to claim I understand Spanish and it's a horrible language.

    18. Re:ObjC sucks by Thinine · · Score: 2

      Method signatures are often ridiculously long (see NSBitmapRep's initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel: method)

      That's rather the point. It make code easier to read and understand when you can see, in the method invocation itself, what all of the parameters are for.

      Parameter names in method calls are /always/ named. You can't just say obj.someMethod(x,y). It's always [obj someMethodForX:x y:y].

      Again, rather the point. Otherwise your above example would endue as initWithBitmapData(p,w,h,b,s,a,p,c,f,r,b).

      The above combine to make even the most basic operations tedious. Want to trim leading/trailing whitespace off a string? Enjoy [someString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]

      Autocomplete makes this rather irrelevant, no? Especially the much improved autocomplete in Xcode4+.

      Immutable arrays, dictionaries, sets, strings. I get it, it can be useful for performance to know something is immutable (maybe, I'm not that convinced). But the common use case is most certainly mutable, so /that/ should be the default, e.g. NSArray should be mutable and then if needed there can exist some NSImmutableArray or something. But no, they did it the other way around.

      That you don't actually understand this point is pretty telling. Performance isn't the only reason to make arrays and such immutable by default. It also makes such structures safer to pass around, especially to outside code, without having to worry about the data getting modified unexpectedly.

      Memory management (up until recently) was neither fully manual nor fully automatic and ownership was based on naming conventions

      Ownership is always based on naming conventions, or else there would be no predictability and the language would be unusable.

      Being a superset of C, they couldn't provide an object-oriented array class using the normal array syntax, so instead you have tedium like [myArray objectAtIndex:2]

      "Fixed" in enhancements coming with Xcode 4.4.

      Ditto for strings. Also, you have to prefix string constants with '@'.

      Oh no, a single extra character!

      Similarly, you can't put "plain" objects into arrays, e.g. [myArray addObject:5] won't work, but [myArray addObject:[NSNumber numberWithInt:5]] will.

      Perhaps you one valid complaint, rendered nearly irrelevant by enhancements again coming in Xcode4.4.

      And of course you can't just create an array with ['a', 'b', 'c'] but instead have to do [NSArray arrayWithObjects:@"a", @"b", @"c", nil].

      Oh hey, same thing.

      Backwards conventions like [NSDictionary dictionaryWithObjectsAndKeys:@"value0", @"key0", @"value1", @"key1", nil];

      And again, a solved issue.

      If I'm going to pay the dev cycle price of a compiled language, it should catch stuff like non-existent selectors at compile time instead of blowing up at runtime

      It does. Unless you turned off those warnings. I always build with -Wall -Wextra -Wno-unused-parameter

      Stack traces from delayed selector calls have zero contextual information

      They have the same information as that selector normally does.

      The single inheritance model and a strict class hierarchy discourages writing reusable code. For example, if I have an app that runs on iPad and iPhone and they share a common screen (from the user's perspective although the layout/design might be significantly different), it's a real task to write a common parent class holds the common code.

      You're doing it wrong. Reusing code is trivial as long as y

    19. Re:ObjC sucks by dbrueck · · Score: 1

      I understand all of what you're saying, merely pointing out that the compiler still issues some warnings that, according to your reasoning, it should not. In some cases it already generates a warning when you use a selector it doesn't recognize (e.g. [ someMessage], or [self someMethodDefinedAfterThisOneAndNotDeclaredInTheInterface]).

    20. Re:ObjC sucks by shutdown+-p+now · · Score: 1

      Immutable arrays, dictionaries, sets, strings. I get it, it can be useful for performance to know something is immutable (maybe, I'm not that convinced). But the common use case is most certainly mutable, so /that/ should be the default, e.g. NSArray should be mutable and then if needed there can exist some NSImmutableArray or something. But no, they did it the other way around.

      There's a good reason for that, actually. Immutable collection operations are a strict subset of mutable ones, which means that e.g. NSMutableArray is a subclass of NSArray. So, if someone declares a method that takes NSArray, you can pass an NSMutableArray to it - the method is generic in that sense. On the other hand, if NSArray was mutable, and deriving from something like NSImmutableArray, then most people would likely forget about the latter, and use NSArray everywhere - including method signatures - even when they really only use the read-only part of the interface. The way it is now, it forces the person writing the API into a good habit: he'll write NSArray first because it's shorter, and will only change it to NSMutableArray when/if he actually needs some operation that's only available there. Thus, his functions will not be less generic than needed.

    21. Re:ObjC sucks by shutdown+-p+now · · Score: 1

      I think you're problem is you think Objective-C is object-oriented. It's not, it's class-oriented

      That doesn't make any sense. Obj-C certainly satisfies all criteria of an object-oriented language: it has objects (entities with inherent identity), and it has polymorphic method dispatch.

    22. Re:ObjC sucks by dbrueck · · Score: 1

      Technically these days you just need one thing, the @property. You don't need anything else. Hard to get less redundant than one definition.

      On iOS, you never need the ivar that you put in, so that's needlessly redundant. That's user error, not a language issue. That reduces you to three required references at worst. The property, the synthesize, and the dealloc reference. New LLVM makes the synthesize go away, older LLVM with ARC killed the dealloc reference. So these days you're down to 1 line of code.

      *If* you have the luxury of being able to use all of the latest and greatest features, that can be the case, yes. That's very often not the case though. But yes, you make a valid point.

      Like I said, you don't seem to have a firm understanding, which is kind of dangerous when critique a language that you don't really know. I took two years of Spanish in high school, doesn't put me in a position to claim I understand Spanish and it's a horrible language.

      Well, let's run with that example: "two years" of Spanish typically means "5 hours of sitting in a class and some homework each week, for 9 months, then a 3 month break, repeated", which is incredibly different from, say, living in Argentina by yourself for the same amount of calendar time. With the former you end up with at best a superficial handle on the basics of the language, while in the latter you can achieve a really good degree of fluency.

      If you are developing code in a language day in and day out for a couple of years, that's close to the latter, and it's plenty of time to understand quite a bit about the language. More to the point of this whole thread, however, in far less time you can come to have a very good feel for how that language compares to others. While you and others have made some very legitimate points about a few individual places where I'm still using old-fashioned ObjC or where in my haste I failed to run a jotted down snippet of code through a mental compiler, my takeaway from all of this is that ObjC is incrementally less lousy than I thought. So far nothing there's little to suggest that fixes to ObjC have significantly closed the gap relative to more modern alternatives.

    23. Re:ObjC sucks by Dog-Cow · · Score: 1

      It does warn you. What have you done to your build settings that you don't see it? Or do you do silly things like hide type info from the compiler by using id all over the place?

    24. Re:ObjC sucks by dbrueck · · Score: 1

      Method signatures are often ridiculously long (see NSBitmapRep's initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel: method)

      That's rather the point. It make code easier to read and understand when you can see, in the method invocation itself, what all of the parameters are for.

      Parameter names in method calls are /always/ named. You can't just say obj.someMethod(x,y). It's always [obj someMethodForX:x y:y].

      Again, rather the point. Otherwise your above example would endue as initWithBitmapData(p,w,h,b,s,a,p,c,f,r,b).

      I'll concede that this one is subjective, while stressing that for me it's one of the reasons the language sucks. :) I do understand the intent behind them, I feel quite strongly however that it makes for a cumbersome language to use.

      The above combine to make even the most basic operations tedious. Want to trim leading/trailing whitespace off a string? Enjoy [someString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]

      Autocomplete makes this rather irrelevant, no? Especially the much improved autocomplete in Xcode4+.

      Autocomplete helps, no doubt. And the newer autocomplete helps a lot. Coming from other languages though the net result feels like the language made something unnecessarily cumbersome and several revisions of the primary IDE of that language have done wonders at making up for it to a degree, without ever quite getting there completely.

      Immutable arrays, dictionaries, sets, strings. I get it, it can be useful for performance to know something is immutable (maybe, I'm not that convinced). But the common use case is most certainly mutable, so /that/ should be the default, e.g. NSArray should be mutable and then if needed there can exist some NSImmutableArray or something. But no, they did it the other way around.

      That you don't actually understand this point is pretty telling. Performance isn't the only reason to make arrays and such immutable by default. It also makes such structures safer to pass around, especially to outside code, without having to worry about the data getting modified unexpectedly.

      Ah, the old "the language is protecting me" argument. It can have its place, but highly dynamic languages like Python or Ruby or C# or any number of others invalidate your point. That *you* don't understand this point is pretty telling. :)

      Memory management (up until recently) was neither fully manual nor fully automatic and ownership was based on naming conventions

      Ownership is always based on naming conventions, or else there would be no predictability and the language would be unusable.

      Except for the fact that many other languages get by just fine without it. If ObjC would be "unusable" without it (which I don't believe would be the case), then that's just another flaw of ObjC and not programming languages in general.

      Being a superset of C, they couldn't provide an object-oriented array class using the normal array syntax, so instead you have tedium like [myArray objectAtIndex:2]

      "Fixed" in enhancements coming with Xcode 4.4.

      I had a similar reaction when Java "fixed" this with syntactic sugar or whatever the solution was. These types of changes are unsettling to me because I'm at least somewhat aware of the tricks needed to pull it off. When any complex system like a programming language and compiler and runtime, you get cruft built up over time, so a language having to bolt on something so fundamental makes me doubt the longevity of the language - undoubtedly there will be unintended side effects or unfo

    25. Re:ObjC sucks by Anonymous Coward · · Score: 1

      NSBitmapRep's initWithBitmapDataPlanes:

      I'm sure it's just a coincidence that the example you randomly plucked out of the air is in fact the longest method name in the entire Cocoa API. Also, when you define a general-purpose bitmap like that, you really do need all of those parameters, and it's a whole lot easier to read a long method name than it is to remember which parameter is which when a function has eleven parameters.

      You're a bit out of date here, and your code is probably incorrect (unless you did in fact intend to create a new root class). That should be:

      @interface Foo : NSObject
      @property (nonatomic, strong) NSString *title;
      @end

      @implementation Foo
      @end

      When you turn ARC on, the -dealloc method you had above is redundant.

      Xcode often pegs multiple CPUs when it's just sitting there

      I've seen XCode use a lot of CPU while it's indexing a project I've just checked out. If you think it's not doing anything, check the status display and you'll probably see that it's not as idle as you've assumed.

    26. Re:ObjC sucks by dbrueck · · Score: 1

      Immutable arrays, dictionaries, sets, strings. ...

      There's a good reason for that, actually.

      Well, a *reason* at least. Whether or not it's a good one is very debatable. :)

      Immutable collection operations are a strict subset of mutable ones, which means that e.g. NSMutableArray is a subclass of NSArray. So, if someone declares a method that takes NSArray, you can pass an NSMutableArray to it - the method is generic in that sense.

      Hmm.. the essence of this argument though is that it works this way because it was designed this way which, while true, doesn't affirm that the design was a good one. (More below)

      On the other hand, if NSArray was mutable, and deriving from something like NSImmutableArray, then most people would likely forget about the latter, and use NSArray everywhere - including method signatures - even when they really only use the read-only part of the interface. The way it is now, it forces the person writing the API into a good habit: he'll write NSArray first because it's shorter, and will only change it to NSMutableArray when/if he actually needs some operation that's only available there. Thus, his functions will not be less generic than needed.

      I think the key part of your statement is "most people would likely forget". And I think you're absolutely right, and I think that would actually be a *good* thing. A common problem with what I consider to be sucky programming languages is that they make the developer worry about things they just don't care about (see the other part of this thread, where we talk about prefixing string literals with '@'). 999 times out of a 1000, the developer doesn't care if a particular array is mutable or not, but the language makes them think about it - often earlier than they are ready to properly think about it as well. By itself, it's a tiny thing, but it's just this sort of thing that pervades ObjC/Cocoa (other languages are at fault too, but we're talking about ObjC).

      The contract implicit in an API will always make it clear whether the object will be modified or not, so you really don't need the language to police it for you. For every one time it ends up helping you (because you were sleepy and ignored the docs or the function name or whatever), there's about a million times where it does /not/ help you. So you incur the cost every time but receive the benefit a statistically insignificant portion of the time.

      Let me given you a counter example: in Python arrays are mutable. At several companies we've deployed all kinds of apps in Python - mobile, games, web backends, desktop apps, systems programming type apps, servers, etc. etc. - basically everything. (Note I'm not trying to argue the virtues of Python over your language of choice, just establishing that here's a language that has mutable arrays and we've used that language in a huge variety of apps and scenarios). Do you know how many times we've been bitten by the fact that we couldn't prevent a called function from modifying an array? Zero. Literally, as far back as I can remember (we started using Python in the late 90s) I can't think of a single case where this was a problem. Not a one. And yet in that time we used arrays thousands of times. What would have been the benefit of the language forcing us each time to specify the mutability of those arrays?

    27. Re:ObjC sucks by dbrueck · · Score: 1

      Haven't touched build settings, not doing anything 'silly', but I suppose that depends on your definition of silly. Here's just one example: in iOS on app startup, you shouldn't do very much in the initial method call into your app delegate as it is time sensitive, so if you want to do something around the time of init but perhaps before all the UI loads, then you might do e.g.:

              [self performSelectorOnMainThread:@selector(biff:baz:) withObject:nil waitUntilDone:NO];*

      No warning. The same was more common when UIKit could only be touched from the main thread. This is just one example, so to anyone who is itching to reply and say "you should use a different approach during app launch", let me pre-emptively suggest you're missing the point. ;-)

    28. Re:ObjC sucks by shutdown+-p+now · · Score: 1

      I think you've missed the point I was trying to make. When the array is local to your code, yes, it doesn't really matter if you start with it being mutable or immutable (unless you also do multithreading, but that's another story). The problem is at the API boundary of your code. If you declare a function accepting an NSMutableArray, it will only be able to accept that, and not an NSArray. If the caller only has an NSArray (because he obtained it from another API that returned that - which it did because it doesn't want anyone mutating that data), he now needs to do an explicit copy to make it mutable. Which is all a waste if your function doesn't actually need a mutable array, and only uses non-mutating operations on it. It's strictly better to make people declare the widest type possible at the API boundary, since it makes their code more generic.

      Python has a very different story in that regard because of duck typing - you don't declare functions as taking lists, either mutable or immutable. You just work with an argument as if it were a list, and then it either implements the API surface that you need, or it does not.

    29. Re:ObjC sucks by dbrueck · · Score: 1

      NSBitmapRep's initWithBitmapDataPlanes:

      I'm sure it's just a coincidence that the example you randomly plucked out of the air is in fact the longest method name in the entire Cocoa API

      Haha, of course not - but it drives home the point of how absurd they can be. And while it's an extreme example it's also not /that/ extreme - there are quite a few that are very long, and a host that IMO qualify as "goofy long". I think explicitness /can/ be beneficial, but wanton verbosity is a net negative. As mentioned elsewhere, I recognize that this is subjective to a degree, but for me it is a real drawback to the language. I've used ObjC alongside other languages for years and strongly dislike the ObjC way, that's all.

      You're a bit out of date here, and your code is probably incorrect (unless you did in fact intend to create a new root class). That should be:

      LOL, yes, I've been severely punished for writing a snippet of code off the cuff like that, and I apologize. I am repentant and will try to avoid it, especially since it invites people to fixate on the minutiae while overlooking the larger point I was (apparently ineffectively) trying to make.

      Xcode often pegs multiple CPUs when it's just sitting there

      I've seen XCode use a lot of CPU while it's indexing a project I've just checked out. If you think it's not doing anything, check the status display and you'll probably see that it's not as idle as you've assumed.

      I'm sure it's doing /something/, it's just not giving any hints as to what that is. The status display shows no activity, and the sudden jump is not typically tied to any user action that we can tell. We'll just be working in another app and notice the system becoming sluggish. We'll bring up the activity monitor and lo and behold Xcode is going nuts.

    30. Re:ObjC sucks by kallisti · · Score: 1

      The single inheritance model and a strict class hierarchy discourages writing reusable code. For example, if I have an app that runs on iPad and iPhone and they share a common screen (from the user's perspective although the layout/design might be significantly different), it's a real task to write a common parent class holds the common code.

      I find that protocols work better that multiple inheritance any day.

      Similarly, there's no way to have a truly dynamic object with a clean syntax, e.g. in Python/ruby/js/and a host of others you could have a quick little object you use to pass state around, kind of like a struct that has its members added on the fly, e.g.: x = new Object() ; x.name = 'dave' ; x.age = 3. There is literally no way to do that in ObjC - the best you can do is create mutable dictionary and use its verbose syntax.

      Well, it isn't impossible, but it does require some deeper knowledge. Objective-C has a concept called KVC, where you can refer to properties by strings, very useful stuff. There's also a mutable dictionary called the associationObject for each object. You could write the KVC reader to put the values into an assoiciated object, which incidentally is pretty much exactly what Python does internally.

      Now, I'd question whether you really want to do this, but it's certainly possible. One thing I like about Obj-C is that things like categories, KVC, KVO, forwardInvocation, exchangeSelector, et al. are there if you really want to use them.

      Use with caution, of course.

    31. Re:ObjC sucks by dbrueck · · Score: 1

      I think you've missed the point I was trying to make.

      No, I'm pretty sure I didn't. I just disagree with it. :)

      When the array is local to your code, yes, it doesn't really matter if you start with it being mutable or immutable (unless you also do multithreading, but that's another story). The problem is at the API boundary of your code. If you declare a function accepting an NSMutableArray, it will only be able to accept that, and not an NSArray. If the caller only has an NSArray (because he obtained it from another API that returned that - which it did because it doesn't want anyone mutating that data), he now needs to do an explicit copy to make it mutable. Which is all a waste if your function doesn't actually need a mutable array, and only uses non-mutating operations on it. It's strictly better to make people declare the widest type possible at the API boundary, since it makes their code more generic.

      It's definitely not 'strictly better'. Again, we might be talking past each other, but my point is that you're burdening people with a detail that they don't care about most of the time. In a programming language, that's a really, really big deal.

      The argument for immutability seems to be couched in the desire to prevent accidents or something. If a function modifies an object you passed to it and you weren't expecting that to happen, what exactly are you doing? (i.e. did you misunderstand what the function does? Is the function buggy?) In all cases it seems like there are other issues going on, and having the language try to save you isn't really the right solution anyway.

      I completely understand the notion that *if* your language or standard library distinguishes between mutable and immutable types, then using one over the other makes your API as generic as possible. I get it. I'm just saying that I don't think that distinction is very helpful most of the time, and yet by making that distinction you force people to worry about it even when they don't care.

      Python has a very different story in that regard because of duck typing - you don't declare functions as taking lists, either mutable or immutable. You just work with an argument as if it were a list, and then it either implements the API surface that you need, or it does not.

      That's exactly my point. Since we're talking somewhat about language design, I used that as an example of how this question of array mutability is not one inherent to programming languages, nor is the ObjC way clearly superior. Rather, it is a design decision that is a part of ObjC, one that I think has cost but little if any real-world benefit, and therefore a flaw in the language (again, it's subjective, but for my part it's a real flaw). The Python example was just to point out that other languages didn't see the need to burden the developer with it, and they get on quite nicely - i.e. to me it's a real world example of what would happen if you didn't introduce that distinction and it turns out that things work just fine without, which is why coming to ObjC from other languages it often feels like you have to do things because the language/library requires it, not because they are actually useful to you or the problem at hand.

    32. Re:ObjC sucks by kallisti · · Score: 1

      You shouldn't do [title release]. It should be self.title=nil.

      This is debatable.

      There's a school of thought that you should always refer directly to the ivar in a release. The reason is that the property could cause other side effects, since it's basically a method call. I had a bug in an EncrypteFile class where it would write out the file when a string was changed. Because updating the file was done in the property setter....well, it didn't work so well.

      Of course, ARC fixes the issue completely.

    33. Re:ObjC sucks by dbrueck · · Score: 1

      The single inheritance model and a strict class hierarchy discourages writing reusable code. For example, if I have an app that runs on iPad and iPhone and they share a common screen (from the user's perspective although the layout/design might be significantly different), it's a real task to write a common parent class holds the common code.

      I find that protocols work better that multiple inheritance any day.

      I don't. They have their place, sure, and the whole delegate model I think is a better fit than subclassing in /some/ cases, but in large part they seem aimed at solving two different sets of problems - protocols are often a good fit when you want to say that an object conforms to, well, a protocol, whereas a mixin class can be really useful when you just want to augment a class's functionality, perhaps for entirely internal purposes.

      Similarly, there's no way to have a truly dynamic object with a clean syntax, e.g. in Python/ruby/js/and a host of others you could have a quick little object you use to pass state around, kind of like a struct that has its members added on the fly, e.g.: x = new Object() ; x.name = 'dave' ; x.age = 3. There is literally no way to do that in ObjC - the best you can do is create mutable dictionary and use its verbose syntax.

      Well, it isn't impossible, but it does require some deeper knowledge. Objective-C has a concept called KVC, where you can refer to properties by strings, very useful stuff. There's also a mutable dictionary called the associationObject for each object. You could write the KVC reader to put the values into an assoiciated object, which incidentally is pretty much exactly what Python does internally.

      Now, I'd question whether you really want to do this, but it's certainly possible. One thing I like about Obj-C is that things like categories, KVC, KVO, forwardInvocation, exchangeSelector, et al. are there if you really want to use them.

      Use with caution, of course.

      Sadly, I've tried all of that (it was actually for our Python-ObjC bridge in fact!). Care to show an example that doesn't result in tons of compiler warnings? I'll buy you a virtual milkshake if there's a way (and disabling warnings doesn't count, hehe).

    34. Re:ObjC sucks by shutdown+-p+now · · Score: 1

      The Python example was just to point out that other languages didn't see the need to burden the developer with it, and they get on quite nicely

      Python does have read-only lists, though - it just calls them tuples. Similarly, it has sets and frozensets. It doesn't have a read-only dictionary, though, but that speaks more about the inconsistency of the Python standard library.

    35. Re:ObjC sucks by Anonymous Coward · · Score: 0

      Here is the correct way to write it.
      @interface Foo
      @property (nonatomic, strong) NSString *title;
      @end

      @implementation Foo
      @synthesize title = _title
      @end

      And here is the correct way to write it with the latest version of clang.
      @interface Foo
      @property (nonatomic, strong) NSString *title;
      @end

      @implementation Foo
      @end

    36. Re:ObjC sucks by Anonymous Coward · · Score: 0

      *If* you have the luxury of being able to use all of the latest and greatest features, that can be the case, yes.

      Why wouldn't you be? ARC works on Mac OS 10.6 and iOS 4 and latter. The new syntax stuff is just syntactic sugar in a lot of cases and doesn't require run time support.

    37. Re:ObjC sucks by Anonymous Coward · · Score: 0

      it drives home the point of how absurd they can be.

      No, it doesn't. In fact, it makes a very good case for Obj-C's syntax in situations where you have a large number of parameters.

      We'll bring up the activity monitor and lo and behold Xcode is going nuts.

      Ever try hitting the "sample process" button and seeing what's actually going on?

    38. Re:ObjC sucks by dbrueck · · Score: 1

      While lists and tuples are both sequence types, semantically they are not Python's version of mutable and immutable list types, nor does their use map to where you'd use an NSArray vs an NSMutableArray in ObjC.

    39. Re:ObjC sucks by dbrueck · · Score: 1

      See my reply elsewhere - several of my customers have analytics to back up their claims that a decent size of their user base is on 3.1.3 (iphone) or 3.2 (ipad).

    40. Re:ObjC sucks by dbrueck · · Score: 1

      it drives home the point of how absurd they can be.

      No, it doesn't. In fact, it makes a very good case for Obj-C's syntax in situations where you have a large number of parameters.

      I guess it's a matter of opinion. Variable names tend to be pretty descriptive, so having named parameters adds little value IMO, e.g. this sort of thing seems goofy to me:

      [self drawAtX:x y:y z:z index:index]

      whereas

      self.drawAt(x,y,z,index)

      is more readable (to me at least). Similarly, a method definition of

      void drawAt(int x, int y, int z, int index)

      is preferable to:

      -(void)drawAt:(int)x y:(int)y z:(int)z index:(int)index

      And the one example I cited was just for kicks since it's one of the longest, but message signature verbosity isn't uncommon in ObjC, e.g.

      gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:
      transitionFromViewController:toViewController:duration:options:animations:completion:
      willAnimateSecondHalfOfRotationFromInterfaceOrientation:duration:

      Since this isn't required by the language (though apparently encouraged by one of the largest backers of the language), I can't really fault ObjC /the language/ for this, but Cocoa is definitely guilty, and the redundancy in the variable names and parameter names /is/ IMO a flaw in the language - it just tends to make the source code noisy. Since code is read more than it is written, to me this is a real problem.

      Code like the following is awful:

      [self showQuestionAndAnswer:[[[SharedData sharedModel] attributes] answerID]
                                                                    questionID:[[[SharedData sharedModel] attributes] questionID]
                                                                    filterID: [[[SharedData sharedModel] attributes] filerID]];

      Is it subjective to say that? You bet! But it's this sort of thing that makes ObjC sucky IMO.

      We'll bring up the activity monitor and lo and behold Xcode is going nuts.

      Ever try hitting the "sample process" button and seeing what's actually going on?

      LOL, of course. I take it you're suggesting that that would reveal something I could then go fix??

    41. Re:ObjC sucks by maccodemonkey · · Score: 1

      It's an interesting post, but I don't know if it's a great rule of thumb.

      I'd agree that using accessors and mutators may not be safe at init or dealloc time. And a property may be backed by an accessor/mutator instead of a synthesize (which, in response to the conversation above, is why synthesize exists in the first place.)

      But, at the same time, there are certain risks to not using accessors/mutators. If you have to unsubscribe from notifications, or clear delegates, you might do that within a mutator. This would make the opposite true, it would be risky NOT to use the mutator.

      Honestly, if you are writing custom mutators, you should be aware you could get nil as an input, and if you get nil as an input, don't go down the path of doing all your other lovely state mutating things because you have no input.

      So part of me agrees with mmalc that you should not use accessor/mutator methods directly in dealloc. But I disagree that you should not use properties, even if they may abstract an accessor/mutator. Not to mention, I picked up that design pattern from people at Apple, so I know they're doing it too. :)

    42. Re:ObjC sucks by shutdown+-p+now · · Score: 1

      While lists and tuples are both sequence types, semantically they are not Python's version of mutable and immutable list types

      I don't see why they aren't. Traditionally, the difference between a list and a tuple - other than immutability - is that tuples have separate type for every element, while lists must all have a single uniform element type (or at least supertype). But that only applies in statically typed languages. In Python, literally, the only difference between the two is mutability - other than that, they represent the same exact concept, that of a ordered indexed sequence of elements.

      While lists and tuples are both sequence types, semantically they are not Python's version of mutable and immutable list types,

      Why wouldn't it? Again, so far as I can see, NSMutableArray is almost exactly identical to Python list in terms of semantics - maintains insertion order, O(1) access by index, amortized O(1) append. Ditto for NSArray/tuple. Admittedly I'm not an Obj-C expert, so I may not be familiar with some important pattern here that I am missing.

    43. Re:ObjC sucks by Anonymous Coward · · Score: 0

      [title release] is perfectly fine for dealloc. There's no point in clearing the reference because the parent object's lifetime is over. Setting it to nil is just extra work.

      self.title = nil is preferable in other places, however, such as viewDidUnload.

    44. Re:ObjC sucks by Anonymous Coward · · Score: 0

      Which one is clearer?
      [self drawAtX:1 Y:1 Z:1 index:1]
      self.drawAt(1,1,1,1)

      [object rotateAboutAxisX:1 Y:2 Z:0 degrees:3]
      object.rotateAboutAxis(1,2,0,3)

    45. Re:ObjC sucks by Anonymous Coward · · Score: 0

      [self showQuestionAndAnswer:[[[SharedData sharedModel] attributes] answerID]

                                                                    questionID:[[[SharedData sharedModel] attributes] questionID]

                                                                    filterID: [[[SharedData sharedModel] attributes] filerID]];

      Now for coders that arent a complete moron like you are.

      id sharedModelAtrributes = [[SharedModel sharedModel] attributes];
      [self showQuestionAndAnswer:[sharedModelAttributes answerID] questionID:[sharedModelattributes questionID] filterID:[sharedModelattributes filterID];

      But the more correct way would be.
      id sharedModelAtrributes = [[SharedModel sharedModel] attributes];
      [self showQuestionAndAnswer:sharedModelAttributes.answerID questionID:sharedModelattributes.questionID filterID:sharedModelattributes.filterID

    46. Re:ObjC sucks by Anonymous Coward · · Score: 0

      - (void)drawAtX:(double)x Y:(double)y Z:(double)z;
      - (void)drawAtRho:(double)rho Phi:(double)phi Z:(double)z;
      - (void)drawAtR:(double)r Theta:(double)theta Phi:(double)phi;

      You can't do that with
      void drawAt(double x, double y, double z);
      void drawAt(double rho, double phi, double z);
      Void drawAt(double r, double theta, double phi);
      Since the all have the same signature.

    47. Re:ObjC sucks by Cochonou · · Score: 1

      The last Mac OS X version for PowerPC is 10.5.8, though.

    48. Re:ObjC sucks by glennrrr · · Score: 1

      I find much of this somewhat debatable, but the one that I found most ill informed was the complaint about containers being immutable by default. You should really spend some time studying the ideas behind functional programming and functional programming languages (which Objective-C is not). Immutable containers mean fewer side affects, I can pass along an NSArray of NSStrings and I know that I can't accidently mutate them behind the scenes; a whole large class of possible hard to debug problems just goes away, and making concurrent code more reliable. Having containers be mutable by default is one of the greatest blunders in the design of such other frameworks as .Net, and I find it hard to believe any experienced programmer would believe otherwise. In the cases where you do need a mutable container, like when your are initially constructing one, just do it and then make an immutable copy using the copy method.

    49. Re:ObjC sucks by dbrueck · · Score: 1

      Ok, so inherent in your reply is the assumption that I haven't spent time in things like functional programming or that I'm not aware of that stuff. Have you considered the possibility that I /have/ actually spent a lot of time both studying and using functional programming but have drawn a different conclusion than you?

      The accidental mutation of objects is almost always a /theoretical/ set of problems - it just does not occur in practice unless you have some other problem (like not testing your code). Making containers mutable by default is not the same as giving license to any bit of code to mutate them - far from it. In, e.g. ObjC, whether or not a method mutates an object is denoted first and foremost by the contract the API provides - the description of the method, the documentation, the shared understanding of what the method does. The language-level enforcement is a distant second. In a language where the containers are mutable by default, that primary - and most important - contract remains in place. Because the secondary enforcement is such a distant second anyway, the lack of it doesn't suddenly introduce a whole new set of problems or anything. And that's the crux of my point: introducing an immutable container and then forcing that distinction to be made everywhere doesn't actually add any real-world value.

      So, if I may, let me throw this back at you: what I find most ill-informed is your assumption that not providing immutable containers creates any real-world problems. You should really spend some time studying how other languages do this and manage to get by just fine. :)

      Let's move this out of the theoretical space - can you help me see at least a /plausible/ example of a bit of code that would accidentally/unexpectedly mutate e.g. an array that wasn't intended to be mutated? Having never encountered this in practice despite using such languages for decades, I'm honestly having trouble coming up with something that isn't totally contrived. I mean, what we're talking about is essentially a function that (a) doesn't do what it is documented to do, and (b) most likely only mutates the object in rare cases (otherwise the very first time you used it you'd see that it is broken), right?

    50. Re:ObjC sucks by dbrueck · · Score: 1

      While lists and tuples are both sequence types, semantically they are not Python's version of mutable and immutable list types

      I don't see why they aren't. Traditionally, the difference between a list and a tuple - other than immutability - is that tuples have separate type for every element, while lists must all have a single uniform element type (or at least supertype). But that only applies in statically typed languages. In Python, literally, the only difference between the two is mutability - other than that, they represent the same exact concept, that of a ordered indexed sequence of elements.

      To a limited extent maybe, but there is a typically a pretty big difference in cases where they are used. Tuples aren't so much for cases where you have a different type for every element, they are more of a position-based record. In a list, the fact that an item is in position 4 vs position 7 is just a function of the ordering of the list, whereas in a tuple the difference in a position /typically/ implies something about what that value is. For example, if you're passing around x,y,z coordinates, you could define a class for that or you could just pass around a (x,y,z) tuple, and by your program's own convention position 0 is the x coordinate, etc. You /could/ use a list in this case, but it's rare - not because the language would prefer you do it one way or another, but because the intent of what you're doing is different.

      This also fits in well with the hashability of tuples vs lists - the latter aren't hashable, so they can't be used as e.g. dictionary keys, but typically that also simply makes a lot of sense: a tuple usually represents a record or a distinct "item", so it makes sense that it should be usable as a dictionary key because it's more or less a specific "thing", whereas a list can't be used as a dictionary key and this also typically makes sense: a list of a bunch of things as opposed to being something specific, so it's less sensical for it to be used as a key anyway.

      nor does their use map to where you'd use an NSArray vs an NSMutableArray in ObjC

      (FTFY)

      Why wouldn't it? Again, so far as I can see, NSMutableArray is almost exactly identical to Python list in terms of semantics - maintains insertion order, O(1) access by index, amortized O(1) append. Ditto for NSArray/tuple. Admittedly I'm not an Obj-C expert, so I may not be familiar with some important pattern here that I am missing.

      I'm not saying that you /couldn't/ use them in the same ways they are used in ObjC, just that that is not typically how they are used. NSMutableArray is almost exactly to a Python list in terms of semantics, but an NSArray does not map to a tuple in terms of how they get used most often in a Python program and vice versa.: in ObjC it's less common (as far as any ObjC code I've ever seen) for an NSArray to represent a simple record (with meaning of items implied by their position in the array), and it's relatively uncommon in Python programs to use tuples as a way to achieve immutability to "protect" an object or something. It might happen (sys.argv is the one case that comes to mind, but it's debatable that using a tuple was the right move there), but it's far less common than using a tuple as a lightweight record. For example, a function's args list (def foo(*args, **kwargs)) is a tuple less because of the desire to achieve immutability and more simply because the position of items matters.

      The distinction between NSMutableArray and NSArray simply doesn't exist in Python (or Javascript or any number of other languages), and my assertion is that those languages aren't lacking in any way because of it (specifically, I mean that I have never, ever seen a case where not having that distinction has caused any problems). And because they are apparently not lacking (meaning: while problems could occur in theory, they don't ever seem to occur in practice), it begs the question as to whether or not making that distinction in ObjC/Cocoa/GNUstep actually adds any real world value (and my assertion is that it doesn't - it's all cost and no real world benefit).

    51. Re:ObjC sucks by dbrueck · · Score: 1

      Calling a function with a bunch of hardcoded magic numbers is far, far less common than calling a function with variables. And when examples like yours occur, there darn well better be a comment nearby explaining the magic numbers. So in a well written program, the first example would be either

      // draw the 2nd item at (1,1,1) to get things started
      [self drawAtX:1 Y:1 Z:1 index:1]

      or

      // draw the 2nd item at (1,1,1) to get things started
      self.drawAt(1,1,1,1)

      So again, having named parameters with every single invocation isn't adding a lot of value. And even if you were to decide that the ObjC way is more readable in this specific corner case, that's a tiny bit of benefit to justify the cost of requiring it all the other times. :)

    52. Re:ObjC sucks by macshome · · Score: 2

      Ditto for strings. Also, you have to prefix string constants with '@'.

      Oh no, a single extra character!

      The '@' isn't how you define a constant. It's shorthand for creating a NSString, since most everything in Obj-C needs objects to function.

    53. Re:ObjC sucks by dbrueck · · Score: 1

      Gah, another example of not seeing the forest for the trees. I keep making the mistake of assuming that people will be able to grasp the principle and not fixate on the specific example (I just grabbed a random sample off StackOverflow that illustrated the point). The point is the readability of the code:

              [nc addObserverForName:AVCaptureDeviceWasDisconnectedNotification object:nil
                                                queue:tasks usingBlock:^(id) {
                                                        dispatch_async(dispatch_get_main_queue(), ^()
                                                                                      { [self refreshDeviceLists]; });
                                                }];
      (somewhat humorously, I had to combine some of the lines because when I pasted it in using Xcode's default formatting, /. refused to post it because I had too much whitespace)

      I get it, some people find that sprawl pretty or readable or whatever. Others (like me) find it unnecessarily verbose and that it ruins readability. The fact that I grabbed a poor example off SO is dumb luck, but look over any sizable ObjC app and you'll see many similar examples (not of redundant message sending but of awkward and overly verbose message sending).

    54. Re:ObjC sucks by dbrueck · · Score: 1

      Not a problem - naming them all the same would probably be a bad idea anyway. Typically you'd name your most common one the simplest, e.g.

      drawAt(x,y,z)

      and then name the others more explicitly:

      drawAtRPZ(...)
      drawAtRTP(...)

      Or if they are all used commonly, then you'd name the first one more explicitly, e.g. drawAtXYZ(...). IMO just as readable as the ObjC but less redundant in typical usage:

      self.drawAtRPZ(rho, phi, z)

      is less noisy to me than

      [self drawAtRho:rho Phi:phi Z:z]

    55. Re:ObjC sucks by Anonymous Coward · · Score: 0

      There is nothing "Magic" about some constants. There is no reason to put numbers that will never change in variables. Named parameters make the comment in the Objective C example not necessary. Your complaint about named parameters is just you have to type more.

      [self drawAtX:1 Y:1 Z:1 index:1]

      is a lot less typing than // draw the 2nd item at (1,1,1) to get things started
      self.drawAt(1,1,1,1)

      Of course all of your arguments are contrived bullshit. Besides in your example // draw the 2nd item at (1,1,1) to get things started
      self.drawAt(1,1,1,1)

      What is (1,1,1)? Is this Cartesian? Is it Cylindrical? Is it spherical? Is it a generalized non-orthonormal coordinate system. Secondly which one is the index? Is it the first argument or the last? According your comment the first argument is the index.

    56. Re:ObjC sucks by dbrueck · · Score: 1

      There is nothing "Magic" about some constants. There is no reason to put numbers that will never change in variables. Named parameters make the comment in the Objective C example not necessary.

      Not at all. The idea is that if you have some hard coded set of values going on, then either there is a comment explaining why or the surrounding context makes it abundantly clear. This should be the case whether you're in ObjC or some other language - i.e. things you should already be doing will be providing nearly as much if not all of the value that forced named parameters provides. So in one extremely contrived case there might be a modicum of debatable benefit, but in all other cases you have to do it anyway even when there is no benefit.

      Again, continuing with this contrived example, other languages handle this better. For example, in Python you'd normally do something like:

      self.drawAt(x, y, z, index)

      but in the case where you have some hard coded values you can make it explicit for clarity:

      self.drawAt(x=1, y=1, z=1, index=1)

      That's the beauty of it: in normal cases where naming the parameters is redundant (since it's implied by the names of your variables) you can leave it off, but in the corner cases where the parameters don't convey as much information you can, if you want, be explicit. This is why the ObjC way is so grating: rather than giving me the option of doing what makes the most sense, the language designers chose one of the two and IMO chose the wrong one - you pay the price every time even if most of the time you don't get any benefit from it.

      Your complaint about named parameters is just you have to type more.

      No - my complaint is that it's more writing and - more importantly - more reading. My biggest complaint is that the verbosity is such that the overall readability tends to be reduced due to the clutter. Given that code is read a lot more than it is written, this is a big deal to me.

      Of course all of your arguments are contrived bullshit.

      LOL, you do recognize of course that the example we're arguing about is one provided by you or some other AC, and one where we're calling a function with 4 hard coded values all with the value of 1, right? Contrived indeed!

    57. Re:ObjC sucks by Anonymous Coward · · Score: 0


      [nc addObserverForName:AVCaptureDeviceWasDisconnectedNotification
                      object:nil
                      queue:tasks
                  usingBlock:^(object) {
                      dispatch_async(dispatch_get_main_queue(), ^{
                          [self refreshDeviceLists];
                      });
                  }];

      Seems very straight forward to me and very readable.

      Other ways you can write this are.

      void (^InnerBlock)() = ^{ [self refreshDeviceLists]; };
      void (^OuterBlock)(id) = ^(id object){ dispatch_async(dispatch_get_main_queue(), InnerBlock);};
      [nc addObserverForName:AVCaptureDeviceWasDisconnectedNotification
                      object:nil
                      queue:tasks
                  usingBlock:OuterBlock];

      or


      void (^InnerBlock)() = ^{
          [self refreshDeviceLists];
      };
      void (^OuterBlock)(id) = ^(id object){
          dispatch_async(dispatch_get_main_queue(), InnerBlock);
      };
      [nc addObserverForName:AVCaptureDeviceWasDisconnectedNotification
                      object:nil
                      queue:tasks
                  usingBlock:OuterBlock];

      or


      void (^InnerBlock)() = ^{ [self refreshDeviceLists]; };
      void (^OuterBlock)(id) = ^(id object){ dispatch_async(dispatch_get_main_queue(), InnerBlock);};
      [nc addObserverForName:AVCaptureDeviceWasDisconnectedNotification object:nil queue:tasks usingBlock:OuterBlock];

      The equivalent C++ would be to your original example would be.

      nc.addObserverForName(AVCapture::DeviceWasDisconnectedNotification,
                            nil,
                            tasks,
                            [] (object) {
                                dispatch::async(dispatch::main_queue(), [this] () {
                                    this.refreshDeviceLists();
                                });
                            });

      This is valid ok C code.

          fuction
      (
            arg1
        , arg2

      , arg3

      )
      ;

    58. Re:ObjC sucks by ElitistWhiner · · Score: 1

      Thou dost protest too much...

      Cynicism parading as intellect...

    59. Re:ObjC sucks by Anonymous Coward · · Score: 0

      No - my complaint is that it's more writing and - more importantly - more reading.

      Except that
      // draw the 2nd item at (1,1,1) to get things started
      self.drawAt(1,1,1,1)

      is both more writing and more reading than

      [self drawAtX:1 Y:1 Z:1 index:1]

    60. Re:ObjC sucks by dbrueck · · Score: 1

      Like I said before, it's bad form to do the latter without a comment or other contextual information explaining why you have those hardcoded values in there. The fact that you are explicitly saying which one is x,y,z, or index is beside the point - someone reading the code is going to be less interested in which '1' corresponds to which parameter and more wondering why those values are hardcoded. And once they know that, then explicitly calling out the names of the parameters has less value anyway.

      (the purpose of the comment is much more than just telling which values are which, it's a level-of-intent comment, and should be there regardless)

      The other point already mentioned is that even if in this extremely specialized case (where you have 4 hardcoded values and no variables) it provides value (and I'm skeptical it does, due to the above), that still doesn't justify requiring it all the other times where it's just redundant.

    61. Re:ObjC sucks by Anonymous Coward · · Score: 0

      I agree on the point about boxing primitives as NSNumber is annoying (one solution, objective-C++ and use STL), but elsewhere in this thread it's noted a number of your points are being addressed (e.g. streamlining properties, inline array @[] and dictionary @{} declarations).

      But mostly I want to second maccodemonkey's reply about the long method names: it's an intentional choice that developers should be able to rely on the editor's autocomplete so we can be productive and yet generate self-documenting code, and better lifecycle maintenance. One aspect of that maintenance is that APIs can't silently change the meaning of a parameter... you'll get a warning that your previous method call is now an unknown selector, which also contradicts your complaint that the compiler doesn't catch nonexistent selectors. (There are situations it can't check, in the same way it can't always guarantee when you call a C function pointer that the pointer has been assigned before you call it)

      So in short, learn to love code completion. It's not a crutch, it's an expected feature of a modern IDE. I know some old-school developers find it distracting and turn it off, but it's their loss to have to type everything out

    62. Re:ObjC sucks by dbrueck · · Score: 1

      [snip]
      Seems very straight forward to me and very readable.

      And that's very fair as this is, after all, a largely subjective question. To me that sort of code scans very poorly (as does the equivalent C++) and is one of the things I dislike about the language. Still, I completely understand that other people have a different reaction to it.

    63. Re:ObjC sucks by shutdown+-p+now · · Score: 1

      To a limited extent maybe, but there is a typically a pretty big difference in cases where they are used. Tuples aren't so much for cases where you have a different type for every element, they are more of a position-based record. In a list, the fact that an item is in position 4 vs position 7 is just a function of the ordering of the list, whereas in a tuple the difference in a position /typically/ implies something about what that value is. For example, if you're passing around x,y,z coordinates, you could define a class for that or you could just pass around a (x,y,z) tuple, and by your program's own convention position 0 is the x coordinate, etc. You /could/ use a list in this case, but it's rare - not because the language would prefer you do it one way or another, but because the intent of what you're doing is different.

      One thing I forgot to mention, by the way, is that in statically typed languages you typically cannot index tuples the way you can index lists or arrays - at best you only get constant indices, but usually the syntax is different as well. So, there, it's not a substitute. In Python, though, it is indexable in exact same manner as a list, using []...

      This also fits in well with the hashability of tuples vs lists - the latter aren't hashable, so they can't be used as e.g. dictionary keys, but typically that also simply makes a lot of sense: a tuple usually represents a record or a distinct "item", so it makes sense that it should be usable as a dictionary key because it's more or less a specific "thing", whereas a list can't be used as a dictionary key and this also typically makes sense: a list of a bunch of things as opposed to being something specific, so it's less sensical for it to be used as a key anyway.

      I'd argue that the reason why tuples are hashable and lists aren't is precisely because of the difference in mutability - you don't want mutable types to be allowed as keys of a hash table (or any associative array, really - but Python only has hash tables out of the box) or members of a set, because mutating the key invalidates the internal structures of that.

      Python has a similar arrangement with sets - where frozenset is hashable, but set is not - and it even explicitly documents the rationale in that case:
      "There are currently two built-in set types, set and frozenset. The set type is mutable — the contents can be changed using methods like add() and remove(). Since it is mutable, it has no hash value and cannot be used as either a dictionary key or as an element of another set. The frozenset type is immutable and hashable — its contents cannot be altered after it is created; it can therefore be used as a dictionary key or as an element of another set."

      And then if you read the definition of 'hashable', it generalizes the above:

      "All of Python’s immutable built-in objects are hashable, while no mutable containers (such as lists or dictionaries) are."

      So I don't think that hashability of tuples has any direct relation to their intended use as a "simple record". Otherwise you'll have to argue that frozenset is that as well :)

    64. Re:ObjC sucks by Anonymous Coward · · Score: 0

      Fair enough - see above. Also Googling will reveal lots of people with Objc-hate. :)

      Yes, but Googling will also reveal lots of people with hate for any programming language that is popular enough.

    65. Re:ObjC sucks by dbrueck · · Score: 1

      This isn't a rant against code completion - I think it's safe to say we've all used it for years prior to ObjC gaining traction due to iOS and yes, it is an expected feature of any modern IDE. What feels like a crutch about it with ObjC is that it's nearly impossible to be productive in ObjC without it. It's similar to developing in Flex if you've tried that.

      I've heard the maintenance argument before and I somewhat agree with it, but in general if you're changing a method signature in any language and being diligent about it, then you'll be checking existing uses of it anyway (similarly, if you're relying on the compiler to find all the issues, then more often than not you're overlooking a bug).

      As with the complaint about forced named parameters being redundant in the majority of cases, requiring it as a protection against future refactoring also seems a bit heavy handed - i.e. a cost with only a just-in-case benefit. And, similarly, coming from other languages where this isn't required, it feels cumbersome since in those languages we don't have that requirement and yet we also don't run into the types of problems these features help prevent.

    66. Re:ObjC sucks by Anonymous Coward · · Score: 0

      You have the contextual information. It's there in the method name.

    67. Re:ObjC sucks by dbrueck · · Score: 1

      This also fits in well with the hashability of tuples vs lists - the latter aren't hashable, so they can't be used as e.g. dictionary keys, but typically that also simply makes a lot of sense: a tuple usually represents a record or a distinct "item", so it makes sense that it should be usable as a dictionary key because it's more or less a specific "thing", whereas a list can't be used as a dictionary key and this also typically makes sense: a list of a bunch of things as opposed to being something specific, so it's less sensical for it to be used as a key anyway.

      I'd argue that the reason why tuples are hashable and lists aren't is precisely because of the difference in mutability

      Yes, that's most definitely why one is hashable and the other isn't. I'm suggesting that that's largely separate from why you use one or the other - in Python, the technical difference between a tuple and a list may involve things like hashability and mutability, but that's rarely what leads one to choose one over the other.

      What you're trying to represent is most often what pushes you one way or another. If you tracking sifting through a set of data to count the number of people with a particular left/right-handedness and gender, you typically wouldn't think of that as something you'd put into a two-item array. It's naturally a tuple because it represents a specific combination you're looking to track, e.g. (right, female).

      IOW at a technical level lists and tuples are very similar, but I'm suggesting that issues of hashability and mutability aren't /normally/ the driving force for choosing one over the other. I think it'd be rare for someone to put something in a list and then say, "oops, better make that a tuple so it's hashable". Rather, if the combination of values represents a specific "thing" or combines to represent a unique value, then that sort of thing naturally ends up in a tuple more than in an array.

      Circling back around, it's that difference in common usage that doesn't really map to the difference in how NSArray and NSMutableArray are typically used.

    68. Re:ObjC sucks by Anonymous Coward · · Score: 0

      Ditto for strings. Also, you have to prefix string constants with '@'.

      Oh no, a single extra character!

      I understand that you don't appreciate the significance of this, but IMO it's a really big deal any time a programming language makes the developer do something "just because". A two-keystroke character preceding every string literal is not the biggest problem, but it speaks volumes about the mentality of the language design - to me it's just another example of not realizing how critical it is for a programming language to get out of the developer's way and let them remain as much as possible in the problem space they are working on.

      Except that that's not a string literal. The '@' is actually creating an NSString object without using one of those constructs that you hate (and that admittedly would be quite intrusive in most cases).

    69. Re:ObjC sucks by Anonymous Coward · · Score: 0

      You shouldn't be supporting PowerPC at all.

    70. Re:ObjC sucks by iluvcapra · · Score: 1

      A method does not have to be declared in an interface in order to be valid, there are instances where you intentionally don't declare methods in order for them to be created at runtime. Core Data does this for its default implementation of getters and setters, for instance: it creates -set<key> and <key> methods at runtime based on the database schema it reads from the managed object model when the application loads, similar to Ruby on Rails ActiveRecord -- these selector names never exist anywhere but in the runtime's head, and they all point to the same IMP pointer that decides which column to edit on the database based on de-stringifying the method name. They do it this way do you don't have to declare anything twice and risk your source code declarations falling out of sync with your database schema declarations.

      If an NSProxy is fronting a remote object, or a future, it doesn't have any declared methods, and this is how it's supposed to work. If you want more method safety, you may want a different language, because what you're describing aren't mistakes, they're features.

      The problem with adding a warning is that it might warn people off doing things the way they're supposed to. I admit I've never created method names at runtime, but I have created classes at runtime, instantiating classes by name based on a config setting so that my library would use the client's preferred name. (This is supposed to be part of what makes it cool, YMMV.)

      --
      Don't blame me, I voted for Baltar.
    71. Re:ObjC sucks by Anonymous Coward · · Score: 0

      The '@' isn't how you define a constant. It's shorthand for creating a NSString, since most everything in Obj-C needs objects to function.

      Yes, it does create an NSString, but... XCode creates it as a constant.

    72. Re:ObjC sucks by kallisti · · Score: 1

      So far, I have always been able to unsubscribe/clear delegates in a deallocator. Having these things live in a different scope than the lifetime of the object makes me
        feel queasy. I've tracked down way too many delegates outliving their owner (performSelector and blocks usually being the problem). If I have a delegate that doesn't have the lifetime of the object, I make a new object to be the delegate and forward to the owner.

      Not to mention, I picked up that design pattern from people at Apple, so I know they're doing it too. :)

      Actually Apple is using both. If you add a property outlet with IB to a view controller, the code generated will use self.prop = nil in the ViewDidUnload and [prop release] in the dealloc.

    73. Re:ObjC sucks by Anonymous Coward · · Score: 0

      Parameter names in method calls are /always/ named. You can't just say obj.someMethod(x,y). It's always [obj someMethodForX:x y:y].

      Again, rather the point. Otherwise your above example would endue as initWithBitmapData(p,w,h,b,s,a,p,c,f,r,b).

      I've had the misfortune to have to fix Objective-C code written by developers coming from a C# background, with method names such as initWithBitmapData:::::::::::

      Yes, Objective-C will allow you to use nameless parameters if that's what you really want, and the code then also becomes almost as unreadable as in those other languages. Quick, what does the following do?

      [x initWithBitmapData:p :w :h :b :s :a :p :c :f :r :b];

      The above combine to make even the most basic operations tedious. Want to trim leading/trailing whitespace off a string? Enjoy [someString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]

      Autocomplete makes this rather irrelevant, no? Especially the much improved autocomplete in Xcode4+.

      Also, using a fine little Objective-C feature called class categories, it's easy to add your own little trim method to NSString so that you can do:

      newString = [myString trimmedString];

  18. Which PR agency does IdleThoughts work for? by hobb0001 · · Score: 1

    His writing sounds like it came straight out of a USA Today puff piece. I guess he hasn't yet learned to change the tone of his writing when posting informally online. (See http://www.paulgraham.com/submarine.html)

  19. Surprise by StikyPad · · Score: 4, Funny

    What more surprises does this venerable language have up its sleeve?

    Theres only one way to find out, and it involves wading through extraordinarily long, unintuitive, and overly verbose object, property, and method names until, Surprise!, you find yet another feature of limited utility.

  20. Re:NeXTStep the grand-daddy of all that is now OS by Arker · · Score: 3, Informative

    OSX is NOT the NeXT OS with the Mac GUI. That would be much better.

    In fact it can be claimed to be a lineal descendent of NeXT, but it's been greatly modified, and the new UI is a regression from either the Mac or NeXT GUIs.

    Also iOS - Obj C is obviously referring to the proprietary dialect of ObjC used in Apple mobie devices. (Nothing to do with Cisco iOS either, why cant they think of their own names for this stuff?) There are other dialects, notably the GCC version, which is much more widely applicable.

    --
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-
    Friends don't let friends enable ecmascript.
  21. Unobjective remarks on objective c by Anonymous Coward · · Score: 5, Insightful

    When I evaluate a language the first thing I do is look at a random block of code and say to myself is this what I really want to be writing?

    When I look at lisp all I see is endless streams of ()()())))) and my brain instantly reboots in a violent seizure.

    jquery would be a decent system if only I could get over the rediculous hackish syntax needed to workaround underlying JS environment.

    ASP and close neighbors were always a turnoff due to the weird escape sequences you needed to plaster absoultely everywhere more recently razor cleaned that up somewhat.

    Objective c has too many perlish @ symbols and a rediculous number of [] [][][ ][][][] [] contraptions all over the place. I know this sounds and is shallow but when I look at code I really need to see the code not have to look under layers of syntatic nonsense existing only for convenience or compatibility/interop purposes.

    Give me a capable clean language not hacks upon hacks.

    Given enough time any language can be made useful... this does not mean I would ever willingly choose to use it. I'm instantly wary of languages with only one killer app (iphone) unless it is heavily domain specific.

    1. Re:Unobjective remarks on objective c by Arker · · Score: 4, Funny

      When I look at lisp all I see is endless streams of ()()())))) and my brain instantly reboots in a violent seizure.

      Sounds like a hardware problem to me. I advise getting a professional neurologist on the job ASAP.

      --
      =-=-=-=-=-=-=-=-=-=-=-=-=-=-
      Friends don't let friends enable ecmascript.
    2. Re:Unobjective remarks on objective c by Anonymous Coward · · Score: 0

      you lost me at "rediculous."

    3. Re:Unobjective remarks on objective c by lightknight · · Score: 1

      You're funny. But he is right about Lisp; you either love it, and can't understand why everyone else doesn't, or you despise it, and can't understand why anyone else wouldn't.

      --
      I am John Hurt.
    4. Re:Unobjective remarks on objective c by Anonymous Coward · · Score: 0

      > Give me a capable clean language not hacks upon hacks.
      Clean, small, simple, efficient, like Oberon2/BlackBox? http://www.oberon.ch/blackbox.html
      System level, industrial library, safe, efficient like Modula3? http://www.opencm3.net/
      Clean design and strong theory like Eiffel? http://eiffelstudio.origo.ethz.ch/

      Only to be isolated from the ecosystem... maybe cobra or D are the closes mainstream options
      http://cobra-language.com/
      http://dlang.org/index.html

    5. Re:Unobjective remarks on objective c by Anonymous Coward · · Score: 0

      When I look at lisp all I see is endless streams of ()()())))) and my brain instantly reboots in a violent seizure.

      What I find rather sad and quite telling about this post is that instead of asking yourself what possible benefit such a syntax would have to the language itself when confronted with something different, you instead run away with a closed mind instead of trying to understand it. If you really think this is some 'hackish deficiency', then you simply have literally no idea as to why this very quality, when given Lisp's freedom to change this rather easily, has persisted for over fifty years with quite a collection of intelligent people working on it. There have been attempts by novices to correct this supposed 'deficiency' who ultimately abandon the effort once they understand the trap it places themselves in, however most people simply learn to adapt in exchange for the freedom granted.

      Way to be a brogrammer, bro. You keep bikeshedding over insignificant details while the rest of us get work done.

    6. Re:Unobjective remarks on objective c by gbjbaanb · · Score: 1

      When I look at lisp all I see is endless streams of ()()())))) and my brain instantly reboots in a violent seizure.

      when I see ()()())))) I think of XKCD

    7. Re:Unobjective remarks on objective c by Anonymous Coward · · Score: 0

      > Give me a capable clean language not hacks upon hacks.

      Then I think you would like Ada. By design, Ada emphasizes readability and maintainability. Its also very general purpose and scalable. Its been my favorite language and my primary "day job" language for years. The revised Ada 2012 standard will be released later this year.

      Here are a few getting started links See the rosettacode link for some source code examples:

      http://libre.adacore.com/
      http://www.adalabs.com/products.html#Ada_On_Rails
      http://en.wikibooks.org/wiki/Ada_Programming
      http://rosettacode.org/wiki/Category:Ada

    8. Re:Unobjective remarks on objective c by Anonymous Coward · · Score: 0

      I agree with you. I mean, you can work around that but I still miss the clean syntax of Visual Basic 3. It was supposed to be a novice's language, but by God I truly enjoyed programming with that. It actually made me love programming as a whole.

    9. Re:Unobjective remarks on objective c by Anonymous Coward · · Score: 0

      Give me a capable clean language not hacks upon hacks.

      Your wish shall be heard. Let me show you a language called Smalltalk.

  22. Re:Does it ... by kthreadd · · Score: 1

    Of course not, it's just a programming language. Sort of like C. Actually, it is C, well sort of, with some things added but down there you have C, even the parts that C++ removed from it.

  23. Re:NeXTStep the grand-daddy of all that is now OS by dan325 · · Score: 2

    Not entirely limited to Apple:

    http://www.gnustep.org/

  24. Re:bonch is a corporate shill for Apple by Anonymous Coward · · Score: 2, Insightful

    Notice how bonch, a notorious shill for corporations such as Apple and Microsoft and with an openly anti-google agenda, happens to post a verbose comment, with source code examples and all, right at the exact same time this piece of Apple propaganda is published on slashdot.

    The asterisk next to his name means he's a subscriber, dumbass. Subscribers see articles before non-subscribers. You can write a reply in the box and submit it when the story goes live.

  25. Re:NeXTStep the grand-daddy of all that is now OS by kthreadd · · Score: 2

    Objective-C is not exclusive to Apple platforms, they just happen to be one of it's most prominent supporters. As a matter of fact the GNU project has actually for long time been a supporter of the language due to its use in GCC and through the Gnustep project.

  26. Objective-c only required for user interface code by perpenso · · Score: 4, Informative

    Its recent success has obviously been tied to one gigantic hit platform, for which it is the only natively supported PL.

    To be clear, objective-c is only required for iOS user interface code. An iOS developer is free to use c/c++ elsewhere, free to use posix rather than iOS for many operating system services, etc.

  27. Obj-C is up because Apple devices are up by gestalt_n_pepper · · Score: 4, Insightful

    I mean, that's the simple explanation. If Apple wasn't having a resurgence, would anyone be paying attention to Ojective-C?

    --
    Please do not read this sig. Thank you.
    1. Re:Obj-C is up because Apple devices are up by kthreadd · · Score: 2

      If Apple wasn't having a resurgence, would anyone be paying attention to Ojective-C?

      You mean like the GNU project?

      http://www.gnu.org/software/gnustep/resources/ObjCFun.html

    2. Re:Obj-C is up because Apple devices are up by dbrueck · · Score: 2

      I can't tell if you're citing that as an example that confirms or disputes his point. :)

      GNUstep has been around for ages, but honestly I'd be very surprised if non-iOS use of ObjC accounts for even 1% of the total usage. 0.1% maybe? 0.01%?

    3. Re:Obj-C is up because Apple devices are up by dbrueck · · Score: 2

      (replying to myself) By iOS I should have said iOS and Mac OS X of course.

    4. Re:Obj-C is up because Apple devices are up by kaffiene · · Score: 1

      So... you agree then that no-one else is using Obj-c?

    5. Re:Obj-C is up because Apple devices are up by Anonymous Coward · · Score: 0

      If Apple wasn't having a resurgence, would anyone be paying attention to Ojective-C?

      You mean like the GNU project?

      http://www.gnu.org/software/gnustep/resources/ObjCFun.html

      Is anyone paying attention to GnuStep?

  28. Re:How is it not modern? Obj-C has modern libs... by Anonymous Coward · · Score: 3, Insightful

    Why do you claim it is "unsafe"? Almost all work done in Objective-C is very "safe", by any measure - mostly you are never using C arrays or the like. Just because they are there does not make the language inherently "unsafe" if that's not how real people use the language.

    There is a common consensus in the CS community that pointers as opposed to references, pointer arithmetics, direct type conversion ("memory overlays") etc. are unsafe, and a language that makes it easy to use them is "inherently unsafe". (That doesn't have anything to do with actual programming practise. Obviously, you can write "safe" programs in any language, even in machine code, as long as you're very careful.) As a comparison, take Ada, Eifel, Java, Haskell -- these are all much safer.

    As for "modern": Perhaps you haven't seen any modern programming languages yet? Because otherwise you should know what I mean. Relatively modern features are e.g. automatic type inference, automatic parallelism, contracts, a concurrent garbage collector -- things like that.

  29. On Apple hardware only, thank you by Corson · · Score: 1

    What is the percentage of software projects being developed for Mac OS X? iOS, on the other hand, currently dominates the smarthphone market and development on this platform is mainly done in Objective-C, which explains the statistics. But it's a "dynamic" situation, as we are all aware.

    1. Re:On Apple hardware only, thank you by Anonymous Coward · · Score: 0

      Which is always the case with computer languages, ADA at the DoD, Cobol with AS/400s or minicomputers, Java and .NET in the corporate world. C++ for software like high-end games, Photoshop and such. I think from all the stuff I've seen, only Python and PHP has been able to achieve wild success out of actually being practical, without any corporate backing or being an old standard (C and derivatives).

  30. Re:NeXTStep the grand-daddy of all that is now OS by cpu6502 · · Score: 1

    >>>the new UI is a regression from either the Mac or NeXT GUIs.

    So you're saying OS X GUI is actually inferior to the Classic OS 9, or the old NeXT computer's GUI? Interesting. I jumped from OS 8 to OS 10.2 and didn't really notice any major differences in the desktop (except the new tab bar at the bottom). Maybe I just didn't use it enough. Why do you think OS 10 is inferior?

    --
    My AC stalker: " I personally agree with your posts most of the time, but that won't keep me from modding you troll"
  31. Re:How is it not modern? Obj-C has modern libs... by Sponge+Bath · · Score: 2

    Why do you claim it is "unsafe"?

    He may be using unsafe in the same way as Microsoft. See this.

    From that page:
    ... code that makes low-level API calls, uses pointer arithmetic, or carries out some other unsavory operation, has to be placed inside blocks marked with the unsafe keyword.

    Heh, "unsavory". Personally, I think pointer arithmetic is delicious!

  32. That's not what the data is saying by sl4shd0rk · · Score: 2

    Tiobe's data is an indicator of how active internet based discussions on each programming language. Even Tiobe says it themselves:

    "What programming languages are hot in the Internet discussions? "

    and

    " Observe that the TIOBE index is not about the best programming language or the language in which most lines of code have been written." (http://www.tiobe.com/content/paperinfo/tpci/index.html)

    All the graph on that link above shows is there's been an increase in the amount of discussion on Objective C. You can say it's due to an increase in adoption, or you could say it's due to people being absolutely fitful with learning it. There's no way to tell what the data means. You may as well google " sucks" and count the results.

    I think the author/submitter is being very hopeful in the way they have construed the data.

    --
    Join the Slashcott! Feb 10 thru Feb 17!
  33. Re:bonch is a corporate shill for Apple by coinreturn · · Score: 1

    If you want a cleaner slasdot, free from shills, mod this astroturfing account down.

    No, if YOU want a cleaner slashdot, then stop posting as AC.

  34. No I will not get off your lawn by SuperKendall · · Score: 4, Insightful

    There is a common consensus in the CS community that pointers as opposed to references, pointer arithmetics, direct type conversion ("memory overlays") etc. are unsafe

    In ObjectiveC we are really using objects more as references than as pointers.

    Basically you come off here as just being afraid of something because you've been told it's scary, not because you've seen real issues.

    As a comparison, take Ada, Eifel, Java, Haskell -- these are all much safer.

    Exactly my point, As I said, I was a Java programmer (for almost a decade) - Objective-C is not really less safe at this point in practice. I say that in terms of stability and in terms of memory use (since you still do not say what you mean by "safe" and the world offers many perils).

    As for "modern": Perhaps you haven't seen any modern programming languages yet?

    Snark alert. As I said, I used Java for a LONG time. Before that I knew better languages still, Scheme and other things... Perhaps you have not worked with enough different languages to know what is really "safe" and what is not.

    Because otherwise you should know what I mean.

    I don't automatically agree with snobs.

    Relatively modern features are e.g. automatic type inference, automatic parallelism, contracts, a concurrent garbage collector -- things like that.

    You're still using a garbage collector? Do you watch that operate while gnawing on woolly mammoth bones or what? ARC is a far superior approach as it involves no overhead.

    As for contracts... you really don't know Objective-C at all, do you?

    You just come off as some ancient CS grad-school twat totally removed from real world programming. I've worked on large systems for multi-national corporations, and now on mobile applications used by millions of people. I don't automatically assume anything anymore, as experience I have found teaches you a lot more than mere theory or some summary of a language you have read on a blog.

    Don't judge any language until you've tried to solve real problems with it.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:No I will not get off your lawn by Anonymous Coward · · Score: 0, Interesting

      There is a common consensus in the CS community that pointers as opposed to references, pointer arithmetics, direct type conversion ("memory overlays") etc. are unsafe

      In ObjectiveC we are really using objects more as references than as pointers.

      Basically you come off here as just being afraid of something because you've been told it's scary, not because you've seen real issues.

      As a comparison, take Ada, Eifel, Java, Haskell -- these are all much safer.

      Exactly my point, As I said, I was a Java programmer (for almost a decade) - Objective-C is not really less safe at this point in practice.

      Let me summarize. You chose to ignore almost everything of what I've said -- I've written explicitly about the language, not how it is used in practise or its implementation, and have presented an argument for this point of view --, have personally insulted me (makes you wonder who's the real snob?), made all kinds of presumptions about my background and expertise with programming languages, all of which are wrong btw, and then boast about your fantastic proficiency with Objective-C.

      That's alright. Sounds like you're a typical Apple user/developer.

      Given that and since you don't like my general language critique, I have something special for you. The main disadvantage of Objective-C in practice is, of course, that you have to write the whole fucking program again if you want to have it run on Android or any other non-Apple platform. I wish you good luck and fun with that!

    2. Re:No I will not get off your lawn by spatular · · Score: 1

      > You're still using a garbage collector? Do you watch that operate while gnawing on woolly mammoth bones or what? ARC is a far superior approach as it involves no overhead.

      Ref counting is just a simple form of garbage collection that cannot deal with reference cycles. As far as I understand, Obj-C solution to the problem is "do not create cycles" and "use weak refs where appropriate". Actually I don't see how this can be definitely superior and the only right way as you state.

  35. Re:bonch is a corporate shill for Apple by Anonymous Coward · · Score: 0

    Hi bonch
    Nice to see that this time you didn't forget to logout from one of your sockpuppet accounts, like you did when you burned your StarcraftWin account.

    http://search.slashdot.org/comments.pl?sid=2844371&cid=39970917

  36. Re:NeXTStep the grand-daddy of all that is now OS by Arker · · Score: 1

    Absolutely!

    Back a few years ago when OSX was new, Tog posted a good, though brief and certainly incomplete, article about the regressions from OS9. You can read that here: http://www.asktog.com/columns/061PantherReview.html

    I dont know off the top of my head of a good comparison of the same type versus NeXT but one could certainly be done and it would look no better in comparison. The NeXT dock or the old Apple menu were both excellent designs, the OSX version of each is an obvious regression, confusing, inconsistent... even the windows widget layouts degraded badly. Classic Mac OS has three widgets, two on the right that have non-destructive functions, and a single button on the left with the destructive (close) function far away from the nondestructive controls. NeXT refined that a bit, with only two buttons, on opposite sides of the window, still keeping the destructive function far from the other one (and adding some 'hidden' functions for power users in a convenient spot where they wouldnt interfere with those who don use such things.) In both cases, the buttons themselves are also distinguished visually with simple, contrasting geometric shapes.

    But on OSX, you have 2 nondestructive and one destructive control bunched together in one tight group without separation, "glowing gumballs" without distinctive shapes. It's unquestionably a massive regression, whether you measure from OS 9 or from NeXT.

    --
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-
    Friends don't let friends enable ecmascript.
  37. Re:bonch is a corporate shill for Apple by scot4875 · · Score: 0

    The thing about bonch's (likely the parent AC) trolling/shilling is that they're so damn obvious -- they all fit the same pattern. Early (usually first, within the first minute or two that the article shows up) post, longish posts that would have been impossible to compose in less than a few minutes, immediately modded to +5 by all the high-UID sockpuppets, frequently with offtopic crap about Google (especially when it's a positive article about Google -- he always derails the conversation to bash them in some way).

    There really aren't that many shills on the site -- it's mainly fanbois. I thought bonch was just a sad fanboi for quite a while as well, but the posting pattern of all of his sockpuppets matches his main account so well that there's just no way it can be coincidence.

    --Jeremy

    --
    Jesus was a liberal
  38. Re:Yes buthttp://apple.slashdot.org/comments.pl?si by Anonymous Coward · · Score: 0

    And just like iOS, it's impossible to do an Android app without using Java.

    Really? Not that I would suggest it but the documentation and sample applications named "native-x" seem to say otherwise!

    http://developer.android.com/sdk/ndk/index.html

    The Android NDK is a companion tool to the Android SDK that lets you build performance-critical portions of your apps in native code. It provides headers and libraries that allow you to build activities, handle user input, use hardware sensors, access application resources, and more, when programming in C or C++. If you write native code, your applications are still packaged into an .apk file and they still run inside of a virtual machine on the device. The fundamental Android application model does not change.

  39. Re:How is it not modern? Obj-C has modern libs... by Anonymous Coward · · Score: 0

    What you are saying is that you don't really know anything about Obj-C. Its pointers really are references, and unless you decide to embed C code, you will never do casts or pointer arithmetic. Using your same logic that the availability of these in the language make it inherently unsafe, you could make the case that javah/jni makes Java an unsafe language.

    Objective-C has a concurrent GC, along with Automatic Reference Counting which is far more efficient and would probably fit in as "modern feature" that no other language currently has. It also has managed queues for easy and efficient parallelism and supports DbC as good or better than any language that has any significant market share.

    What does that leave out of your list... type inference. Oh boy, I certainly can't live without that!

  40. Re:bonch is a corporate shill for Apple by Anonymous Coward · · Score: 0

    I think there's a helicopter outside your house.

  41. It had to wait, however, for the mobile device by LinuxIsGarbage · · Score: 1

    It had to wait, however, for the mobile device revolution to have its day, being ideally suited to the limited resources on portable devices

    WTF? New iOS devices are more powerful than NeXTStep and original OS X machines.

    The reason it became popular is because the iPhone & iPad are very popular in the mobile space. They aren't popular because of Obj-C, but rather a combination of user experience and marketing. Not only that, but if you want to develop on iOS, you have the choice of... Obj-C.

    On the Desktop computer side of things, "Visual studio" is probably the most popular development environment, in part because Windows is the most popular platform, but even then there's still a choice of lanuages: VB, C++, C#.

  42. Wrong, you can use other languages for iOS by SuperKendall · · Score: 4, Informative

    Not only that, but if you want to develop on iOS, you have the choice of... Obj-C.

    That is not at all true, you can use C#, Ruby, Javascript, and other languages also...

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:Wrong, you can use other languages for iOS by drkstr1 · · Score: 2

      Not only that, but if you want to develop on iOS, you have the choice of... Obj-C.

      That is not at all true, you can use C#, Ruby, Javascript, and other languages also...

      Indeed. We develop for iOS in Actionscript even. True story.

      Language choice is becoming largely irrelevant. It's all about the end build target these days. IMHO, It's better to build your core architecture in a platform agnostic way, and then extend it into specific UI / hardware implementations as needed.

      --
      Fanboy Status: Apache Flex, C#, Eclipse, KDE, Pirate Party, Ron Paul, Slackware, Windows 7
  43. C++ wasmore primative at the time of NeXT by peter303 · · Score: 1

    In the mid 1980s ObjectiveC was product supported by a software company while C++ an open-source hobby. I was a NeXT developer then. I can see why Steve would have wanted to go with something a little more solid. But it was that C++ was more open and FREE that made more attractive to the university crowd and hackers. So it leapfrogged over ObjectiveC for a long while.

  44. Re:How is it not modern? Obj-C has modern libs... by SuperKendall · · Score: 1

    If so, he's still wrong - we don't do anything that would be meant to go inside an "unsafe" block in normal Obj-C programming.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  45. Modern ObjC does not have that issue... by SuperKendall · · Score: 1

    Objective c has too many perlish @ symbols and a rediculous number of [] [][][ ][][][] [] contraptions all over the place.

    It has a handful of @ symbol constructs, and with the use of properties now most code does not have a ton of [] the way Lisp like languages do...

    Good Objective-C code is really clear because of the named parameters, with a good IDE verbosity in method names does not hurt you.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  46. It only took one line by SuperKendall · · Score: 1

    LOL, you deduced that from a couple of lines of code hurriedly typed into a web form?

    Combined with your list of things that were, as he said, already fixed, along with this line of code:

    NSString *title;

    You have a property, why are you making a class var? Those are just the kinds of things that make people who have been working with ObjC a long time think of developers new to the language, or at least not spending any time keeping up... not to mention the complaint about delayed selectors, they are often abused by people who don't really understand why something doesn't work and just pushes the code out to a delayed call.

    Your whole post was valid perhaps two years ago, but there are not many items you are complaining about that are real issues anymore, and the remaining ones are mostly subjective (naming conventions, I prefer the long names in ObjC to other languages).

    Also, I do exactly the thing you mentioned (a common base class that is reused between iPhone/iPad instances of those classes) and have not found that to be a problem. What do you feel is limiting in that regard?

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:It only took one line by dbrueck · · Score: 1

      You have a property, why are you making a class var?

      I'll readily concede that it's habit mostly - because IIRC pre-64-bit Mac we had to. :) Obviously I'm catching a lot of grief because I wrote a couple of quick lines into a post without really proofing it, writing it more as a "you know what I mean" than a "this is precisely the way to do it". I appreciate everyone's right to do this (and it's a long part of the /. tradition) but to me it's a case of not seeing the forest for the trees. As mentioned elsewhere, the cumbersome nature of ObjC is most noticeable to me when I have to hop back and forth between it and pretty much any other language we use on any project. So, yes, while there are some flaws in what I typed into ye olde form element, I think it's overshadowing the point of just how much /work/ it is to write code in ObjC compared to many other languages.

      Now, I don't have a whole lot of data, so consider this purely anecdotal, but this is what I have found to be universally true: people who use ObjC and also program a lot in other languages tend to dislike ObjC, while people who really like ObjC don't tend to be as broad in their use of languages. Both sides can draw their own conclusion from that. :) For me, if I'm working on something else and then hop in to ObjC for a bit, it feels exactly like going back to assembly did back in the day when we finally transitioned to C for most everything: once we had gotten used to the higher level nature of C, dipping into assembly felt archaic. Those who still swore by assembly hadn't really spent much time in other pastures, and would extol the virtues of modern macro assemblers and other new features.

      Those are just the kinds of things that make people who have been working with ObjC a long time think of developers new to the language, or at least not spending any time keeping up...

      That's a fair point, although I would make a minor counterpoint that there is often a long time between when a new feature becomes available and when it becomes usable in practice due to the need to support legacy projects and code, so I think it's somewhat expected to discount some of the new features to a language (granted, I know these specific ones were added in what Apple calls the 'modern runtime' or some such, but still there are features like ARC and on some projects blocks that are still unusable to me due to legacy needs).

      not to mention the complaint about delayed selectors, they are often abused by people who don't really understand why something doesn't work and just pushes the code out to a delayed call

      Well, I couldn't really say whether or not other developers use them, nor does their abuse imply that they are bad - they are a standard feature and legitimate to use my frustration with them still holds. :)

      Your whole post was valid perhaps two years ago, but there are not many items you are complaining about that are real issues anymore

      ... if we can use the latest and greatest features, which is often not the case. It's great that these warts are being fixed, but given the choice I'd much rather just choose a more modern language that didn't have them in the first place. Perhaps that's part of the root of it all for me - the unique features of ObjC provide very little in terms of benefits over other choices available today. If it weren't the "standard" language for Mac/iOS development I'd never touch it again.

      I do exactly the thing you mentioned (a common base class that is reused between iPhone/iPad instances of those classes) and have not found that to be a problem. What do you feel is limiting in that regard?

      I think a lot of it comes from the inability to have any sort of mixin class. It's common for us to need e.g. a bunch of similar functionality on multiple iPhone screens, suc

  47. Re:How is it not modern? Obj-C has modern libs... by IamTheRealMike · · Score: 2

    Why do you claim it is "unsafe"? Almost all work done in Objective-C is very "safe", by any measure

    Objective C, at least as used on iOS, is not a safe language. I don't see how anyone with serious programming experience could believe that.

    Here are some things about it that are unsafe. Firstly, it's not garbage collected (on the phone). Manual memory management has a long history of resulting in memory corruptions, leaks, and even security vulnerabilities. Yes, on MacOS X there is GC available, so Apple clearly recognize this. They appear to believe that it's not OK on a phone.

    Secondly, and this is just crazy to my mind, dereferencing a null pointer (ok, rephrase it in terms of sending messages to nil if you like) ..... does not terminate the application. It's actually a "defined" operation in the sense that it's defined to return garbage or another nil. Sending a message to nil has no useful purpose so it is guaranteed to reflect a bug in your application, unless (worse) you have some "clever" programmer who decided to rely on this obscure behavior. The nonsense of accessing NULL is why it is defined to result in an application crash on any sane platform - you want to stop the app at that point to avoid possible data corruption. But Objective C apps will happily continue their merry way, overwriting internal state with garbage or more nils until it auto-saves your now hopelessly corrupted data to disk.

    This is a specific instance of a more general problem with Objective-C, which is that despite being based on C it turns a lot of failures that would be compile failures in any modern language into runtime failures or heuristically driven compiler warnings. Most research into programming languages for the last 10-15 years has been about how to catch more errors earlier, mostly through better type systems (a lot of functional research is in this direction). Objective-C takes a massive step backwards in this regard, converting errors even C++ compilers can catch ahead of time into issues you may not even notice unless you have extremely thorough testing plans. Example: typos in method names.

    Thirdly, Objective-C does not have any kind of real namespacing support. The Cocoa libraries use the convention of an API prefix, but there's no language support for it, meaning "namespaces" such as they are tend to be very short or non-existant. Combined with the way symbols can mishmash together in the same binary can lead to awkward to solve linking issues.

    There are a lot of problems with Objective-C that make it difficult to consistently write correct code and flatly contradict how modern languages are designed (no surprise, as it's not modern).

  48. Re:bonch is a corporate shill for Apple by Anonymous Coward · · Score: 0

    Actually, there are accusations that you're the shill, and that your name is Rui Maciel from Portugal: http://tech.slashdot.org/comments.pl?sid=2844659&cid=39972515

    Care to respond?

  49. Re:bonch is a corporate shill for Apple by Anonymous Coward · · Score: 0

    Early (usually first, within the first minute or two that the article shows up) post, longish posts that would have been impossible to compose in less than a few minutes

    Subscribers see posts about 30 minutes before everyone else. They show up in red at the top of the front page (for example, an Oracle article will go public about 20 minutes after this post). It's kind of surprising how many posters don't seem to know this.

    immediately modded to +5 by all the high-UID sockpuppets

    There's no way to know who moderates a post unless you're a Slashdot admin.

    All of this is off-topic crap and should be modded accordingly.

  50. Re:bonch is a corporate shill for Apple by Anonymous Coward · · Score: 0

    If writing informative posts that give relevant information about the topic at hand is corporate propaganda, then Slashdot needs more shills posting.

    I can't even remember the last time someone used a code tag in a Slashdot post. It's almost like this place is a forum for technical discussion again.

  51. Re:How is it not modern? Obj-C has modern libs... by Anonymous Coward · · Score: 0

    Vala (http://en.wikipedia.org/wiki/Vala_(programming_language)) actually has ARC as well and is worth a look.

  52. You received what you asked for by SuperKendall · · Score: 2

    Let me summarize. You chose to ignore almost everything of what I've said

    That summarizes your position. I corrected almost all of your points. You responded to only one of mine, and there not even a point on the language but a meta issue of languages and platforms that any third rate philosophy student could offer up as a supposedly "informed" opinion on computing.

    have personally insulted me (makes you wonder who's the real snob?) made all kinds of presumptions about my background...

    I only responded in kind. You started out insulting me first (and assuming I knew nothing about higher level languages even when I first stated I knew Java in my original post), giving me free range to question anything and everything about you.

    The responses I type are a mirror on those who I am responding to. You came off as an arrogant elitist ivory-tower prick with little in the way of practical experience (that last item mostly based on the few concrete items you offered).

    Furthermore you never even said what you DO know anything about, a very curious omission indeed! You can claim I got "everything wrong" all day long, while never revealing even a portion of what you do know while at the same time complaining we are guessing at it.

    Perhaps you should try a different writing style if you would like more pleasant responses. Perhaps if you don't want people to get your background wrong you should provide some instead of poorly thought out complaints that illuminate only your area of ignorance and not your field of understanding.

    The main disadvantage of Objective-C in practice is, of course, that you have to write the whole fucking program again if you want to have it run on Android or any other non-Apple platform.

    In the end to have the best application for any platform you have to tailor it specifically for that platform; in REAL LIFE very little code can be reused even if the platforms share a similar language. The code itself matters so little compared to the conceptual model of how the program fits together.... and the parts of the code that really matter, in specific UI interactions have to be totally customized to a different platform anyway.

    But I guess if you are OK with simply dumping bad applications out that annoy users I suppose I could see where you would have the opposite feelings and write drek that will run "anywhere".

    In the end, it sounds like you are a typical ivory tower prick as I had you pegged at the start. You have only reenforced that vision with your later writings, abrasive and rude and pretending you know everything while illustrating how little real world understanding you have.

    I'll let you have the last response, since you have nothing real to write but simply further fling insults while claiming you are above me. The readers know the truth, know how much you really know and exactly the tone of responses you drew out. I have already unmasked you, so my work with you is done.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:You received what you asked for by aaaaaaargh! · · Score: 1

      *shakesheadindisbelief* My last word?

      Jesus Christ, get a life!

  53. An interviewer once ask me: by Anonymous Coward · · Score: 0

    He asked me if I had any experience with Smalltalk. I said "no". He said "Good, because if you did, I wouldn't hire you. Smalltalk requires a very bizarre way of thinking, and I wouldn't want anyone who thinks that way on my team."

    1. Re:An interviewer once ask me: by jcr · · Score: 1

      I'd thank him for the warning, and go somewhere else. Smalltalk is one of the very few languages I would accept as an alternative to Obj-C.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
  54. Re:How is it not modern? Obj-C has modern libs... by shutdown+-p+now · · Score: 1

    Why do you claim it is "unsafe"? Almost all work done in Objective-C is very "safe", by any measure - mostly you are never using C arrays or the like. Just because they are there does not make the language inherently "unsafe" if that's not how real people use the language.

    Obj-C was unsafe before they introduced ARC - back then you could over-release an object and then use it. ARC is a fairly recent addition, and many people haven't caught on yet.

  55. Re:How is it not modern? Obj-C has modern libs... by shutdown+-p+now · · Score: 1

    Here are some things about it that are unsafe. Firstly, it's not garbage collected (on the phone). Manual memory management has a long history of resulting in memory corruptions, leaks, and even security vulnerabilities. Yes, on MacOS X there is GC available, so Apple clearly recognize this. They appear to believe that it's not OK on a phone.

    Obj-C is not manual memory managed since the introduction of automatic reference counting, which is technically a form of GC. One thing it certainly does is preventing memory corruption - you can't end up with a dangling reference anymore (unless you specifically try). Memory leaks are irrelevant, since they also exist in managed languages with tracing GCs like Java - all it takes is forgetting to null out a reference.

    Secondly, and this is just crazy to my mind, dereferencing a null pointer (ok, rephrase it in terms of sending messages to nil if you like) ..... does not terminate the application. It's actually a "defined" operation in the sense that it's defined to return garbage or another nil. Sending a message to nil has no useful purpose so it is guaranteed to reflect a bug in your application, unless (worse) you have some "clever" programmer who decided to rely on this obscure behavior. The nonsense of accessing NULL is why it is defined to result in an application crash on any sane platform - you want to stop the app at that point to avoid possible data corruption. But Objective C apps will happily continue their merry way, overwriting internal state with garbage or more nils until it auto-saves your now hopelessly corrupted data to disk.

    I happen to agree that it's a bad design decision, but it's most certainly not "obscure behavior" in Obj-C - in fact, it's quite idiomatic to rely on this fact when doing chained method calls or property accesses without interleaving null checks.

    Also, the reason why accessing NULL results in an application crash is not because they wanted to stop an app, but because C and C++ were designed to run with as few checks as possible, and reading from a null pointer causes a segfault on most platforms (but not all: e.g. DOS wouldn't segfault, nor would most other platforms with no memory protection; that's why C++ standard says that it's "undefined behavior" to dereference null).

  56. Re:How is it not modern? Obj-C has modern libs... by gnasher719 · · Score: 1

    Secondly, and this is just crazy to my mind, dereferencing a null pointer (ok, rephrase it in terms of sending messages to nil if you like) ..... does not terminate the application. It's actually a "defined" operation in the sense that it's defined to return garbage or another nil. Sending a message to nil has no useful purpose so it is guaranteed to reflect a bug in your application, unless (worse) you have some "clever" programmer who decided to rely on this obscure behavior.

    At that point anyone who actually uses Objective-C agrees that you are talking out of your arse. Standard C free () and realloc (), C++ delete operator - they all work just fine with null objects. And there's a reason for that.

    Sending messages to nil is not "defined" in some obscure sense, it's defined. It's part of the language. It's not "clever" to rely on it, it is bloody stupid and ignorant to not rely on it.

  57. Corrections by SuperKendall · · Score: 2

    Objective C, at least as used on iOS, is not a safe language. I don't see how anyone with serious programming experience could believe that.

    Some people with experience know better.

    Here are some things about it that are unsafe. Firstly, it's not garbage collected (on the phone).

    No, it uses ARC, which is superior, since there is no run time overhead.

    Manual memory management has a long history of resulting in memory corruptions, leaks, and even security vulnerabilities.

    Even under the old regime memory management was mostly automatic. You simply signaled when you wanted an object, and then when you were no longer interested. That is a strike against Objective-C many raise but I just never found to be an issue in practice.

    Yes, on MacOS X there is GC available, so Apple clearly recognize this. They appear to believe that it's not OK on a phone.

    You clearly are not keeping up on year old iPhone development practices.

    Secondly, and this is just crazy to my mind, dereferencing a null pointer (ok, rephrase it in terms of sending messages to nil if you like) ..... does not terminate the application

    I thought you just said you disliked memory corruption.

    Sending a message to nil has no useful purpose so it is guaranteed to reflect a bug in your application,

    if ( myString > 0 )

    Nope, not a bug, and very useful compared to:

    if ( myString != nil && myString > 0)

    That alone, if you have done any Java programming, would make it all worthwhile. Basically it safeguards against all kinds of horrible bugs if sending a message to nil means nothing. Would you prefer shouting into the void rip off your arms? Why would you prefer that an accidental sending to an obviously un-initialized space break the program? Madness!

    despite being based on C it turns a lot of failures that would be compile failures in any modern language

    Poor Objective-C, choosing a different path. DIFFERENT IS TEH EVILS!

    They have made different choices but they are not bad ones. They are along the age old lines of deciding where they sat on the sliders of things like dynamic vs. static, and then making the best of where they landed.

    Most research into programming languages for the last 10-15 years has been about how to catch more errors earlier,

    Meet CLANG. Objective-C development is NOT hurting for early warnings you have problems, and in fact is probably ahead of just about any other language right now. "modern" or otherwise.

    Example: typos in method names.

    You have got to be kidding me, there were compiler warnings about that as far back as I remember. Just because you CAN send any message to an object does not render you doing so any less an error a compiler can easily flag, just as mis-typing a function name would raise an error.

    Thirdly, Objective-C does not have any kind of real namespacing support.

    That is very annoying at first coming from other languages. That is the one thing I would like them to resolve, as you say it can raise overlap issues. But in the end it's really a minor thing as the naming convention (mostly a class prefix), works OK. The main problem with it though is not the one you raise - overlap with other classes in fact raises a linker error, so it's not like that really happens for whole classes. No, the problem with lack of namespaces is the inability to easily include a large number of header files at once by simply declaring you want to use a namespace.

    There are a lot of problems with Objective-C that make it difficult to consistently write correct code and flatly contradict how modern languages are designed (no surprise, as it's not modern).

    Funny how Objective-C has now leapfrogged ahead of other "modern" languages in terms of library support and language features like ARC. I programmed Java for over a decade and would b

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  58. ObjC is plainly clearer. by SuperKendall · · Score: 1

    Which one is easier to read?

    To my mind the ObjC code is easier to read because it is clearer.

    string.strip is harder to read generally speaking, because it's so small it can get lost in other code, and it pre-supposes a great big pile of understanding the history behind the terse word "strip". For a new programmer coming in, the Objective-C code is far clearer.

    When browsing through a large volume of code either would take the same time to skim over since you knew what they were doing (though as noted the shorter example is easier to accidentally miss).

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:ObjC is plainly clearer. by Jane+Q.+Public · · Score: 1

      "string.strip is harder to read generally speaking, because it's so small it can get lost in other code..."

      Hahahahaha! You have a weird concept of "readability". That's a pretty thin argument.

      When browsing through a large volume of code either would take the same time to skim over since you knew what they were doing (though as noted the shorter example is easier to accidentally miss).

      Sorry, but it literally doesn't work that way. It takes more time for the human eye and brain to parse the longer line. That's a fact that anybody else who studied human engineering can confirm for you.

    2. Re:ObjC is plainly clearer. by spongman · · Score: 2

      you have got to be kidding.

      right?

  59. Not unsafe even then by SuperKendall · · Score: 1

    Obj-C was unsafe before they introduced ARC. back then you could over-release an object and then use it.

    Actually even that's not really the case. Note that what would actually happen in that case would be that something would try to send a message to that object, at which point the runtime system would throw an exception noting the object did not respond to that message. It's not unsafe in the classic sense, since you are going through the runtime to send messages to objects.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:Not unsafe even then by shutdown+-p+now · · Score: 1

      Actually even that's not really the case. Note that what would actually happen in that case would be that something would try to send a message to that object, at which point the runtime system would throw an exception noting the object did not respond to that message.

      How does the Obj-C runtime identifies objects? Does it maintain some global table of them all, with a numeric identifier other than the object address? My impression was that it just uses pointers for that, hence why you write things like "NSString* s".

      Even if so, it would seem to me that it'd be possible for another object to reuse the identifier of the deleted one, in which case it would then erroneously receive the message (and, potentially, even be able to respond to it, e.g. if it is of the same type).

    2. Re:Not unsafe even then by Anonymous Coward · · Score: 0

      My understanding of the Obj-C Runtime is that there is a special "factory" copy of each object that, in memory, is partially represented as the "real" reference object (with initialized-to-zero/null) values (including non-zero pointer to the same of its parent object & a list of additional methods/interfaces, and partially by special fields for the runtime (global reference counter, etc). This is how NameSpaces are checked at compile time and messages are resolved at runtime by looking at the factory object, checking its list of methods/interfaces, then going to the parent object and repeating, all the way back up to NSObject... only after checking that tree, would an error be thrown at runtime. This is a feature of the language.

      The Obj-C Runtime is really the ingenious part of the whole situation. Actually, the language spec doesn't make sense WITHOUT the runtime information. Both can be found at apple's developer site. Coming from C/ASM background as an EE, the central idea of programming languages is always very stark:
      Abstract away the machine code (MOV #0x001C, ESX) and use constructs and a good compiler to get you there (create objects, make them interact, don't concern oneself with anything).

      That said, I'm not developing in Obj-C but am preparing for a better, more coherently designed/implemented language GoLang. It's really the bees' knees, yall.

  60. Re:How is it not modern? Obj-C has modern libs... by Anonymous Coward · · Score: 0

    As a comparison, take Ada, Eifel, Java, Haskell -- these are all much safer.

    Yea Java is really safe.

  61. The cures... by SuperKendall · · Score: 1

    .. if we can use the latest and greatest features, which is often not the case

    Sometimes. The hugest jump in improvement, by far, was ARC - and that support goes back to iOS 4 even though they introduced it with iOS 5. You can easily use that today, and have been able to really for a while now as there are very few iOS 3 devices around anymore.

    I think a lot of it comes from the inability to have any sort of mixin class.

    What about categories!!!! Especially with the newer ability to also create variables local to them (which there have been means to do for awhile in different ways).

    Thanks for the very thoughtful response.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:The cures... by dbrueck · · Score: 1

      .. if we can use the latest and greatest features, which is often not the case

      Sometimes. The hugest jump in improvement, by far, was ARC - and that support goes back to iOS 4 even though they introduced it with iOS 5. You can easily use that today, and have been able to really for a while now as there are very few iOS 3 devices around anymore.

      Some of my customers and their analytics would disagree with you. :) (I can't drop

      I think a lot of it comes from the inability to have any sort of mixin class.

      What about categories!!!! Especially with the newer ability to also create variables local to them (which there have been means to do for awhile in different ways).

      Thanks for the very thoughtful response.

      You nailed it - the inability to add new variables w/o hackery was a big limiting factor such that we tend to use categories just for adding utility functions, e.g. to CGRect or something. I think categories with instance vars will help a lot once we can use them.

    2. Re:The cures... by SuperKendall · · Score: 1

      I think categories with instance vars will help a lot once we can use them.

      You can use that today with a thread dictionary that stores class vars by the class instance...

      Or even better you can use objc_getAssociatedObject(), which is available from iOS3.1 onward!

      Even if there are a few stragglers on iOS3 you should simply move to using Arc and iOS4. The benefits with ARC alone are huge, as is the ability to use blocks. At this point the opportunity cost of supporting iOS3 is way too large, you are going to spend 50% more time on any given project for a less stable result. Even if the customers are wary of it explain it in those terms.

      It is even nearing the time to move to iOS5 support only I think, given the other benefits already delivered and the ability to use weak references (which makes KVO usable).

      In practice with ARC the time I used to spend though the projects looking for memory leaks is near to zero. After a month of heavy coding I ran Leaks and ObjectAlloc on the code, and there was simply nothing.... ARC really does work as well as they claim. That is a HUGE benefit.

      --
      "There is more worth loving than we have strength to love." - Brian Jay Stanley
    3. Re:The cures... by dbrueck · · Score: 1

      I'm very eager to get to ARC, no doubt about it. As for the existing ways to get instance vars in categories, to me they all feel a bit on the side of hackery. That's just my perception of course.

    4. Re:The cures... by SuperKendall · · Score: 1

      The thread dictionary approach is hackery, no doubt.

      Associated references though are not really "hacking" at all, they are a good and well-supported mechanism for adding metadata to a class instance.

      --
      "There is more worth loving than we have strength to love." - Brian Jay Stanley
  62. It's not really about the language by mpfife · · Score: 1
    Not meaning any disrespect to the creators/language, but Objective-C is grown because it's what iOS devices use for programming with. If Apple had used Python or C++ we'd be using that instead. The rise/fall of languages now has just as much (if not more) to do with what devices they're put in as much as any construct of the language.

    I swear that at times Slashdot feels like a bunch of stuffy comp-sci folks stuck in the 80's. You'll argue day and night about minor technical details, but it's none of those details/minutia that really make a product take off. Sure, flaws will kill a product, but beyond a very simple point, they are just a tool to get a job done. Steve Jobs understood that, maybe we should too and stop the language circle-jerks.

  63. Re:bonch is a corporate shill for Apple by Anonymous Coward · · Score: 0

    Skip your meds today, did you?

    Where did you get the bizarre idea that companies like Apple or Microsoft would bother with hiring shills to post on /.? All the people who have ever read this site are barely a rounding error compared to the number of customers they have. They don't need to win hearts & minds, because developers who support their platforms can make money doing so.

  64. Re:How is it not modern? Obj-C has modern libs... by spongman · · Score: 1

    Why do you claim it is "unsafe"? Almost all work done in Objective-C is very "safe", by any measure

    Objective-C is a superset of C, right?

    so you can write to arbitrary memory locations, call arbitrary (non-NX) code locations?

    unsafe.

    "Modern" languages (and i'm thinking Ada, here) don't allow such things, or make it trivial to disallow them (java's JNI, c#'s 'unsafe', etc...)

  65. method names and immutability by clay_buster · · Score: 1

    Method signatures are often ridiculously long (see NSBitmapRep's initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel: method)

    Parameter names in method calls are /always/ named. You can't just say obj.someMethod(x,y). It's always [obj someMethodForX:x y:y].

    The above combine to make even the most basic operations tedious. Want to trim leading/trailing whitespace off a string? Enjoy [someString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]

    I consider this an advantage. All those folks who talk about self-documenting method names finally have a place to hang their hats.

    Immutable arrays, dictionaries, sets, strings. I get it, it can be useful for performance to know something is immutable (maybe, I'm not that convinced). But the common use case is most certainly mutable, so /that/ should be the default, e.g. NSArray should be mutable and then if needed there can exist some NSImmutableArray or something. But no, they did it the other way around.

    Immutability is about more than just performance. Java and C# both have immutable strings. Good programming practice often recommends immutability as a way of enforcing contracts and avoiding unintended side effects. Some languages avoid mutability for any object.

    1. Re:method names and immutability by dbrueck · · Score: 1

      Method signatures are often ridiculously long (see NSBitmapRep's initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel: method)

      Parameter names in method calls are /always/ named. You can't just say obj.someMethod(x,y). It's always [obj someMethodForX:x y:y].

      The above combine to make even the most basic operations tedious. Want to trim leading/trailing whitespace off a string? Enjoy [someString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]

      I consider this an advantage. All those folks who talk about self-documenting method names finally have a place to hang their hats.

      Yep, I recognize that some people like this and consider it an advantage. I don't - to me it just gets in the way of getting the job done and does nothing to increase readability since the variable names themselves will already convey nearly as much (or as much) meaning.

      Immutable arrays, dictionaries, sets, strings. I get it, it can be useful for performance to know something is immutable (maybe, I'm not that convinced). But the common use case is most certainly mutable, so /that/ should be the default, e.g. NSArray should be mutable and then if needed there can exist some NSImmutableArray or something. But no, they did it the other way around.

      Immutability is about more than just performance. Java and C# both have immutable strings. Good programming practice often recommends immutability as a way of enforcing contracts and avoiding unintended side effects. Some languages avoid mutability for any object.

      Yeah, see the other posts on this sub-thread. Again, I understand that some consider the non-performance aspects an advantage, but I don't - I've never come across an instance where I thought to myself, "whew, thank goodness that object was immutable!".

      I'm a strong proponent of duck typing and kin so I find language-level enforcement of mutability a nuisance. I understand the theoretical benefits of that type of enforcement, but again in practice find it more cost than benefit, and IMO depending on it is poor programming practice, i.e. if I'm being a good developer and writing good code and testing my code, then that sort of language-level enforcement does me no good whatsoever. If I'm being sloppy and/or not testing my code, then that sort of language-level enforcement isn't really going to be enough to save me.

  66. Re:How is it not modern? Obj-C has modern libs... by ogdenk · · Score: 1

    There is a common consensus in the CS community that pointers as opposed to references, pointer arithmetics, direct type conversion ("memory overlays") etc. are unsafe, and a language that makes it easy to use them is "inherently unsafe". (That doesn't have anything to do with actual programming practise. Obviously, you can write "safe" programs in any language, even in machine code, as long as you're very careful.) As a comparison, take Ada, Eifel, Java, Haskell -- these are all much safer.

    As for "modern": Perhaps you haven't seen any modern programming languages yet? Because otherwise you should know what I mean. Relatively modern features are e.g. automatic type inference, automatic parallelism, contracts, a concurrent garbage collector -- things like that.

    Java is a slow pig and the rest of your examples have little real-world usage for desktop/handheld applications, at least client-side. There's lots of unoptimized wonderfully safe academic languages lacking decent libraries for people to create applications that integrate well with the rest of the system. LISP is awesome but I wouldn't want to try to write a modern game or productivity app in a reasonable amount of time with it.

    Obj-C at least gives you a lot more options as far as libraries with a lot less reinventing of the wheel than any of your examples.

  67. Language matters little to experienced developer by master_p · · Score: 1

    The actual programming language matters very little to an experienced developer, who sees the code not in terms of the programming language it is programmed in but as a set of abstract algorithms and syntax trees.

  68. Re:NeXTStep the grand-daddy of all that is now OS by uglyduckling · · Score: 1

    That is hardly an article about regressions from OS9. It's a complaint about the sizes of some windows (mostly irrelevant now we have high-DPI screens), some GUI features that are deprecated as far as I know (drawers), and quite a lot that's complimentary about the OS. The only thing you really have to complain about is the window widgets. I agree that it's not as immediately clear to the new user (although RED is a pretty global idiom for STOP) and almost all apps would throw up a warning dialog before throwing away data. Those that don't (e.g. Safari) have a history function anyway. Calling it a "massive regression" is ridiculous. There are many things that are better, a few that are arguably worse, as with any OS update.

  69. Re:NeXTStep the grand-daddy of all that is now OS by Arker · · Score: 1

    Yeah I noticed after posting that is a later article. You can find the earlier one I meant to link easy enough with google.

    Even this later, much more complimentary article links to the "why the dock still sucks", and it mentions quite a few of the problems. The areal density issues are NOT irrelvant now, not at all. High DPI screens do nothing about areal density issues, on that you are confused.

    Colours take much longer to process than simple geometric shapes here, as Apples own research proved a few decades back. Slowing the user down with a confirmation screen afterwards is no substitute for making controls that are not so error-prone to begin with.

    The dock and the apple menu bar are the biggest problems, so bad that he split them out from the main article. The NeXT Dock was a thing of beauty and the OSX version one of the ugliest designs ever made. It has improved somewhat, over many years, in response to a lot of criticism. It's still pretty darn ugly, even if time and natural interests (Tog is and will presumably always be an Apple man) eventually lead him to tone his criticisms down more than is warranted.

    And yes it's true that with newer releases some criticisms were eventually listened to. Some, not all. Not anywhere near all.

    --
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-
    Friends don't let friends enable ecmascript.
  70. Objective of Obj-C win-win by ElitistWhiner · · Score: 1

    Code resuse...FAIL

    Nonetheless, its survival predicated alone on its modularity was and is the weapon SteveJobs used to ' rev.' past the competition and while on a line count basis the language reuse fails.

    The same can't be said for ' Obj-C' reuse-ability which enabled Apple to repurpose its software systems on innovative hardware implementations. WIN-WIN

  71. Re:How is it not modern? Obj-C has modern libs... by Anonymous Coward · · Score: 0

    Certainly a userspace app can't write to arbitrary memory locations (and not even access them), not on sane hosted platforms (OSes) anyway. It can try for sure, and yes, it'll probably crash very quickly. It's not like apps written in "safer" languages can't crash because of an uncaught exceptions. (Or is it not crashing if you could've caught it? ...)

  72. Re:bonch is a corporate shill for Apple by tzanger · · Score: 1

    No, the AC is right; you are a cyber-stalker with a weird hobby. I've been watching these idiotic posts for quite a while now (years probably) and all you manage to do is embarass yourself with how ... focused ... you are to inform the rest of us about shills. I'd add you to the tiny list of people I actually let the site outright block from me but you're too much of a coward to step out from the AC cloak, presumably because you'd lose your "audience."