Slashdot Mirror


Ask Slashdot: Swift Or Objective-C As New iOS Developer's 1st Language?

macs4all (973270) writes "I am an experienced C and Assembler Embedded Developer who is contemplating for the first time beginning an iOS App Project. Although I am well-versed in C, I have thus-far avoided C++, C# and Java, and have only briefly dabbled in Obj-C. Now that there are two possibilities for doing iOS Development, which would you suggest that I learn, at least at first? And is Swift even far-enough along to use as the basis for an entire app's development? My goal is the fastest and easiest way to market for this project; not to start a career as a mobile developer. Another thing that might influence the decision: If/when I decide to port my iOS App to Android (and/or Windows Phone), would either of the above be an easier port; or are, for example, Dalvick and the Android APIs different enough from Swift/Obj-C and CocoaTouch that any 'port' is essentially a re-write?"

316 comments

  1. Obj-C by occasional_dabbler · · Score: 4, Insightful

    The one really good thing that has come out of the Apple fashion parade is objective C. Jobs' legacy isn't all the shiny fashion crap, it is this powerful and really rather beautiful language. This is from someone usually branded a Microsoft shill. If you want to write iOS/OSX take advantage of the native tools.

    --
    "Our opponent is an alien starship packed with atomic bombs," I said. "we have a protractor"
    1. Re:Obj-C by Mike+Buddha · · Score: 0, Flamebait

      Are you serious? Objective C is crap. It may have been hot stuff 25 years ago, but it's older than Java, and that shows. Swift is the future for Mac OSX/iOS development. Don't waste your time learning what was state of the art in 1988 (ie Objective C).

      --
      by Mike Buddha -- Someday the mountain might get him, but the law never will.
    2. Re:Obj-C by Anonymous Coward · · Score: 1, Insightful

      Uh, there is nothing powerful or beatiful about it. Programming in Obj-C is like using a hammer to catch butterflies. It works but it most certainly ain't beautiful.

    3. Re:Obj-C by occasional_dabbler · · Score: 1

      Crumbs. Swift does look pretty sweet. I think I'll go tend my lawn...

      --
      "Our opponent is an alien starship packed with atomic bombs," I said. "we have a protractor"
    4. Re:Obj-C by occasional_dabbler · · Score: 4, Interesting

      I grew up with Fortran, C was a revelation and obj-C was an epiphany. C++ was, of course, a heresy...

      --
      "Our opponent is an alien starship packed with atomic bombs," I said. "we have a protractor"
    5. Re:Obj-C by djbckr · · Score: 1

      As of now, Swift *is* native tools. And it's a far more elegant language than Objective-C.

    6. Re:Obj-C by QuietLagoon · · Score: 0
      The parent is informative? No specifics are given, nothing of substance is mentioned. Just one person's [rather obviously biased] opinion.

      .
      It looks like me as little more than fanboi cheerleading.

    7. Re:Obj-C by Savage-Rabbit · · Score: 2

      Are you serious? Objective C is crap. It may have been hot stuff 25 years ago, but it's older than Java, and that shows. Swift is the future for Mac OSX/iOS development. Don't waste your time learning what was state of the art in 1988 (ie Objective C).

      Objective C no worse than C, C++, Java, C# .... in fact I prefer Objective C to C++ in many ways and I definitely prefer all of these languages to Java.

      --
      Only to idiots, are orders laws.
      -- Henning von Tresckow
    8. Re:Obj-C by occasional_dabbler · · Score: 1

      I ask in ignorance, why would I design the GUI in obj-C when I have X-tools/interface builder to do all that for me? I just connect the dots, right? +1 for Python, btw: I write science code in Python/Fortran. nasty messy stuff, but puts food on the table...

      --
      "Our opponent is an alien starship packed with atomic bombs," I said. "we have a protractor"
    9. Re:Obj-C by taharvey · · Score: 4, Insightful

      Anyone who says 'X' language is crap, can safely be ignored.

      Unlike our previous poster, though My opinion is that Java, is actually one of the least useful languages out there. It doesn't provide a higher level syntax than objC or C++, like the "better languages" Ruby, Python, etc. Nor does it provide the performance or memory footprint of systems languages like C, C++ or objC. It is bound by a runtime, that is meant to make it run-anywhere. Yet ironically the universal crown is going to javascript+HTML5, not java. Java in many ways is the new pascal, it is largely an educational language with a strong base in corporate intra-net applications.

      You can use c, objC & C++ for decades to come. However Swift is very exciting (and I'm a embedded guy). It is the first serious language to come along that can challenge the C family of systems languages that I can remember. It has all of the native performance of C, the memory footprint advantages of reference counting, all of the syntactical goodness of ruby or python, the inherent parallelism of groovy and haskell, yet can morph into a JIT language in development with a very enticing hot-coding environment. With Chris Lattner & Apple backing it, it will be successful. I can't wait till it filters down to the open source space so I can use it in embedded systems.

    10. Re:Obj-C by occasional_dabbler · · Score: 1

      Yes, a little, but I admit not for GUIs. I liked it precicely because of the low-level control. It was quite an adventure for a naive Python/Fortran coder...

      --
      "Our opponent is an alien starship packed with atomic bombs," I said. "we have a protractor"
    11. Re:Obj-C by dottrap · · Score: 4, Interesting

      Agreed. And for the op, Obj-C is the best language to use right now. Being well versed in C means he can learn Obj-C in a day. Obj-C is a very small superset of C.

      The hard part is learning Cocoa, but that is true of any framework whether that is Swing, Android, MFC, GNOME, Qt.

      Swift is so new, you will have to learn Obj-C anyway to learn Cocoa.

      The best bet is for the op to write model/cross-platform code in C, and then use Obj-C for the native UI layer. Then repeat for Android/Java (via JNI) and Windows Phone/C++CX.

    12. Re:Obj-C by Anonymous Coward · · Score: 1

      I remember back in 1997 we were so excited about this hot new language everyone wanted to use - Java. Other folks said C, TurboPascal/Delphi were never going away. Well neither gout was right. Sure Java exploded but it became the Honda Civic of languages while C is still around but Delphi is not. I run a team of mobile developers - I tell the new trainees to learn ObjC first (part of it is we already have an ObjC training program while we are building the Swift training program) for there is a lot of ObjC code around (especially in mac Desktop apps) and none is going to throw it away. Even if the newer module is written in Swift and binary compiled with existing modules when you run into problems and have to debug it would be good to know the ObjC code.

    13. Re:Obj-C by Em+Adespoton · · Score: 2

      It was my understanding that if you want "complete" control, you still need to use ObjC, and that Swift was for dashboards, things previously known as WebApps, and other lightweight situations where you aren't actually doing anything novel, just packaging an interface to a datastore or moving sprites around.

      That said, Swift is just as good on inheritance as ObjC, and does garbage collection correctly (benefits of a CLR).

      ObjC has been tuned to OS X/iOS, and if you write in ObjC, you should be able to make a single back end that's easily portable to OS X as well as iOS; Swift would be more for iOS only.

      I really do like the real-time iteration available in Swift though.

      That said, my opinion must be crap, because I'm older than Java too :D I still like Pascal and Common LISP, but wouldn't write a modern application in them (flashback to writing Avara mods in the 90's using ClarisWorks). Most stuff I write these days is in C or Python.

    14. Re:Obj-C by Grant_Watson · · Score: 2

      I wrote a toy Lisp interpreter in Objective-C, on Linux without any of the NS* libraries. It was great for that, because it gave polymorphism while at the same time letting you mess with object internals. My root class had a method that would overwrite the object's isa pointer, changing it into an object of another class, for use by the garbage collector; try that in most languages.

      The basic layer is C, which is a small and relatively clean language, with a small and relatively clean Smalltalkish object model layered on top of it, with tools that let you bridge the gap when you need to do so. That's awesome. But Apple wants people to use it as an application language, and so they keep layering features and tying syntax to their runtime libraries to make up for the fact that it's a systems language at heart. Modern, Apple-influenced Objective-C is much less beautiful than the old language, though it may be more convenient for application development.

    15. Re:Obj-C by gnupun · · Score: 1

      I ask in ignorance, why would I design the GUI in obj-C when I have X-tools/interface builder to do all that for me? I just connect the dots, right?

      Interface Builder generates a bunch of boilerplate obj-c code for you. But anytime you need to add your own references etc or do anything other than simple stuff, you have modify that code. It's not as easy to use as C#, VB or Delphi because it exposes all the plumbing of the GUI.

    16. Re:Obj-C by ttucker · · Score: 2

      and I definitely prefer all of these languages to Java.

      Probably safe to ignore everything else he said too...

    17. Re:Obj-C by ThorGod · · Score: 2

      I tell people this when they bring up iphone vs android. From a developer point of view, I prefer the iOS/objective-C/Apple way.

      This is with the huge caveat of general happiness on my part. Android's making everyone run linux. I've always wanted to see Windows knocked off the top spot (for economic and CS/IT reasons) - and it's finally happening

      --
      PS: I don't reply to ACs.
    18. Re:Obj-C by Dutch+Gun · · Score: 3, Informative

      I was recently pondering whether my game engine (written in C++) should have it's native OSX back-end / interop written in Swift or Objective-C. From what I can see, for what I need to do, Objective-C remains the clear choice, at least for now. There's a lot of good documentation on Objective-C / Cocoa, as well as lots of examples for how to interop between Objective-C and C++. I haven't even been able to determine if this is possible with Swift after searching around a bit on the net. Interop with Objective-C, yes, but that's pointless for me. I don't see Apple obsoleting or depreciating Objective-C in the near future. There's a heck of a lot of legacy code in that language, and like you mentioned, it seems like Swift wouldn't even be a proper replacement at this point for everything Objective-C can currently do.

      As with pretty much any other language-choice debate, you really first need to know what someone plans to do with it before you can make a worthwhile recommendation. All languages have strengths and weaknesses, so it's foolish to point to one without even knowing what you'll be doing. The OP first wants to know about "quick and easy" for which I'd probably recommend Swift, but then wants "portability", for which I'd recommend C (for him, since he knows that - personally I use C++) with carefully walled off interfaces to the GUI frontend, but *only* if the complexity merits such treatment rather than a simple port in native code for each version. Without any more info, I can't make a better recommendation than that really.

      --
      Irony: Agile development has too much intertia to be abandoned now.
    19. Re:Obj-C by maccodemonkey · · Score: 4, Informative

      It was my understanding that if you want "complete" control, you still need to use ObjC, and that Swift was for dashboards, things previously known as WebApps, and other lightweight situations where you aren't actually doing anything novel, just packaging an interface to a datastore or moving sprites around.

      That said, Swift is just as good on inheritance as ObjC, and does garbage collection correctly (benefits of a CLR).

      ObjC has been tuned to OS X/iOS, and if you write in ObjC, you should be able to make a single back end that's easily portable to OS X as well as iOS; Swift would be more for iOS only.

      I really do like the real-time iteration available in Swift though.

      That said, my opinion must be crap, because I'm older than Java too :D I still like Pascal and Common LISP, but wouldn't write a modern application in them (flashback to writing Avara mods in the 90's using ClarisWorks). Most stuff I write these days is in C or Python.

      Oooof. So much wrong in a single post. Let's review....

      Swift definitely does not do garbage collection. Obj-C actually had a garbage collector for a while (Swift never has) but it was optional, and support for it has ended.

      What Obj-C has now is something called ARC (Automatic Reference Counting). At compile time (not run time) the compiler does a static analysis of the code and determines where it needs to add memory management code, and then quietly does so for you. This means there is no run time hit, and behind the scenes everything is still manual memory management. Sometimes you still need to hint to the compiler what to do (usually when trading pointers with C), but 99.99% of the time it just works.

      Swift is built on the same runtime as Obj-C, so it inherits ARC. With Obj-C, you can turn ARC off and continue writing manual code, and I'm not sure if Swift allows the same, but it's the exact same behavior. Swift uses the same manual memory management functions as Obj-C in the background, while in the foreground the developer still writes without memory management. I'm not sure what this "benefits of a CLR" is you're talking about, as that's a term usually associated specifically with the Common Language Runtime of the Microsoft language family, but it's neither here nor there. Swift does not run in a VM (it's natively compiled just like C or Obj-C), and it does not have a garbage collector. (But the compiler will add your memory management code for you.)

      As far as Swift being multi platform, Swift most definitely for sure runs on OS X, so the language choice has absolutely no bearing on what platforms you want to port between. I have a partially Swift project going on the Mac right now. Swift is definitely not iOS only. Beyond that, it looks like Apple will be working to open source much of it and move it to other platforms.

      I'm not sure what this business is about Swift being for lightweight solutions. It runs on the same runtime as Obj-C, it's starting to be as fast as Obj-C, and it interoperates with any Obj-C code (as Obj-C will interoperate with any Swift code). Apple has never messaged that it's for lightweight apps, and developers aren't treating it that way. I still prefer Obj-C, but I'm not sure what that bit is about at all.

    20. Re:Obj-C by Anonymous Coward · · Score: 0

      "Android's making everyone run linux."
      Bull. Android runs the Dalvik/ART runtime, both of which are Java. You don't have to touch the Linux part of Android if you don't want to.

    21. Re:Obj-C by ArhcAngel · · Score: 3, Informative

      Sure Java exploded but it became the Honda Civic of languages while C is still around but Delphi is not.

      The news of Delphi's death has been greatly exaggerated.

      --
      "A person is smart. People are dumb, panicky dangerous animals and you know it." - K
    22. Re:Obj-C by Anonymous Coward · · Score: 1

      Clearly the Mac fans are inflating your score. Java useless? Have you ever heard of Hadoop, Cassandra or any of the other big data/cloud projects from the Apache foundation? Have you ever heard of Rust? You are an embedded guy but aren't excited by it? Makes it hard to consider your post anything but shilling.

    23. Re:Obj-C by Anonymous Coward · · Score: 0

      and I definitely prefer all of these languages to Java.

      Probably safe to ignore everything else he said too...

      No, Java really does suck so much ass that even the fact that Android is written in it cannot redeem it.

    24. Re:Obj-C by Anonymous Coward · · Score: 1

      Android, unfortunately, gets the worst parts of java with very few of the benefits.

      It doesn't support hot swapping so debugging requires a full compile install cycle.
      Junit isn't supported so tests have a significant amount of overhead (more like system tests).
      Many of the android apis take classes rather than interfaces so you end up with dozens of proxy objects that do nothing.

      You still have good IDEs and static analysis, but they barely make up for the verbosity and the annoying proxy objects I mentioned above.

    25. Re:Obj-C by Anonymous Coward · · Score: 0

      But it supports Apple!

    26. Re:Obj-C by Anonymous Coward · · Score: 0

      Why does "making everyone run linux" matter? I mean, iOS is making everyone run UNIX too, and when you look at how open most android phones actually are, you end up at the conclusion that they're basically exactly as open as iOS.

    27. Re:Obj-C by samkass · · Score: 1

      Apple has explicitly said in their "Using Swift with Cocoa and Objective-C" document that Swift isn't compatible with Objective-C++. You have to create a C API for the C++ code and call it through that. Hopefully that will be remedied soon, but in the meantime using Objective-C++ instead of Swift is a no-brainer for new development that needs extensive compatibility with a C/C++ installed base or set of libraries.

      It looks like a fun language, and perhaps appropriate for small projects, but it's definitely not there yet.

      As to the original poster, I think the answer is "yes". Learn them all. And Java and Scala and whatever else. The more language you learn the more you see it's 98% syntax changes and you can appreciate the 2% of each language/environment.

      --
      E pluribus unum
    28. Re:Obj-C by Dahamma · · Score: 1

      I'd bet the majority of budding iOS developers start their first project using Interface Builder. It works pretty well if you don't stray too far from the Apple "look". But once you want to do something novel, you start spending more and more time working around IB than with it.

      And god forbid you want to collaborate with other developers via version control. Having to manually 3-way merge a couple thousand lines of XML causes IB to quickly lose its shine...

    29. Re:Obj-C by Anonymous Coward · · Score: 0

      > TurboPascal/Delphi were never going away.

      As someone who was there for those times, nobody liked Pascal/Delphi and there was very little useful business logic implemented in those languages. They were easily replaced or their core businesses are just no longer in existence. There were no claims (feel free to run some usenet statistics) that pascal or delphi were never going away. You're trolling.

    30. Re:Obj-C by Anonymous Coward · · Score: 1

      And C is older than Java. So what? It's not the age of the missile, it's the motion of the boat or something something.

    31. Re:Obj-C by silfen · · Score: 3, Informative

      Objective-C didn't "come out of" Apple or NeXT or Jobs. It was created by Brad Cox and Tom Love at ITT and Stepstone in 1983 and is derived from Smalltalk-80. Jobs just bought the company in 1995.

    32. Re:Obj-C by Anonymous Coward · · Score: 0

      In regards to Swift being the first serious language to come along that can challenge the C family, not to say that I disagree, but can any language that seems evangelized by only one company with a highly integrated platform and ecosystem be considered a challenge to a language family with such broad and diverse support? Granted, a large number of people know of C++ via GNU or Visual Studio, but when I first started, I had options like Borland and Watcom too. These days, I don't much programming, but when I do it's little tools to help automate my workflow. I have a lot of little batch processes. I do all of this in Python on Macintosh, and lately I've been combining python with Automator. Do you (or anyone else) know why python or C# aren't real challengers to C? Is it because of the interpreted aspect?

    33. Re:Obj-C by taharvey · · Score: 3, Informative

      Nobody said Java was useless. I just can't think of why I'd use it over another language unless I had to. I'd either pick C/C++/objC for speed, or I'd pick Ruby/Python for efficiency, or I'd pick Groovy or Haskell if I was leaning functional... depending on my needs. I can't think of why I'd go in the middle. Seems like the worst of all worlds.

      Rust and Swift are very on par languages attempts, with the exception that Swift also has a very nice compile time JIT and hot-coding environment. However, and this is crucial: Swift is beating Rust to the punch - and that is an important factor in languages. Swift had 200,000 devs download the language spec in the 1st 24 hours. That is probably 10x more than have ever downloaded the Rust spec.

      Rust is still listed as experimental, as Swift is being rolled out to developers. The Rust team is still arguing over implementation, in an unfortunate design-by-committe kind of way. Rust has no killer-application driving it. Swift does. Swift is Driven by Chris Lattner, who has probably done more for the compiler world in the last 10 years than the next 25 guys put together (LLVM, Clang, OpenCL, etc). And Swift is backed by a huge amount of Apple dollars. Even the Original developer behind Rust has tipped his hat to the project. So Yeah, I expect Swift to rocket to the Top 5 languages in the next 2 years while Rust stays a academic plaything for many years to come.

    34. Re:Obj-C by Jeeeb · · Score: 5, Insightful

      Unlike our previous poster, though My opinion is that Java, is actually one of the least useful languages out there. It doesn't provide a higher level syntax than objC or C++, like the "better languages" Ruby, Python, etc.

      Java doesn't provide a higher level syntax than C++/Obj-C but it does provide a much more easily parsed syntax. The result is lightning fast compilation, sane compilation errors and excellent tooling support. Auto-completion, powerfull refactoring, background compilation and powerful lint tools make for a very productive programming environment. Even C# doesn't have full proper background compilation yet. Intellisense is close but there are whole classes of compile time errors that it doesn't pick up.

      Similarly stability has done a lot for the language. Java is one of the few languages were I'm confident that I could build a project I wrote ten years ago with no issues. C++ on the other hand... ugh! Just last week I shifted a project from VS2012 to VS2013 and had spend an afternoon fixing random code breakage because MS broke their Chrono libraries and their retarded compiler gave errors in the template definition in their header file rather than the actual lines breaking compilation. Not to mention the ball of fun that was trying to get the latest versions of our dependencies to compile... Fun stuff like the 64bit build for some reason produced 32bit obj files... In Java land I add a line to Maven or for Android drop a library in the libs file and add it to the dependencies... Presto, nothing more to think about.

      It's also a very readable proramming language imo. Packages=directories and one public class per file make navigating Java code very easy. Types are obvious and code is simple to follow. I've worked in C++,Java,C#,Javascript,Python and also on my own time in C and Haskell. Out of those I'd say Java and C# easily have the best readability. (For the record Haskell has the worst by far imo.)

      It is bound by a runtime, that is meant to make it run-anywhere. Yet ironically the universal crown is going to javascript+HTML5, not java.

      I'm not sure if that is ironic. The Java runtime brings other benefits than cross platform compatibility. If I dereference a null pointer or use an index outside of array bounds, the Java runtime will give me a nice error telling me exactly what the error was, which line of code in which class caused it and what the sequence of calls that lead to the error was. Try doing the same thing in C++/Obj-C. If you're lucky the code will be running on a developer machine and you can hook in the debugger and if the code isn't too heavily optimized maybe even get the line of code it occured on. If you're unlucky the code is on a production server/client system somewhere and your stuck trawling through a log to find the error. (For the record record Haskell easily takes the title of hardest to debug language thanks to lazy evaluation.)

      Plus it's not like C++/ObjC have no runtime. For example, if you don't have the right VC++ redistributable installed, you'll get nowhere trying to run C++ application compiled in VC++. Their runtime just doesn't include a JIT compilation stage (for better or worse)

      Anyway here's the tl;dr: Java doesn't have exciting language features but it does have excellent tooling, excellent readability and is one of the easiest languages out their to debug. That too me is way more valuable than exciting language features. I prefer C# but I'm happy to work in Java instead.

    35. Re:Obj-C by taharvey · · Score: 1

      Fundamentally the interpreted/runtime nature of C# and python put them at a serious performance disadvantage, and well as generally limit what you can do with them. They can't be systems languages, they aren't even fully general purpose languages. The C# only allows for it to be suited for certain applications, as an application language. Python isn't high performance enough to be more than a scripting or prototyping language.

      While Swift will be evangelized by only Apple initially, I hope it gets general traction. The other open source projects to come out of the Apple compiler group are probably the most important pieces of compiler tech in the last 10 years, including LLVM, Clang, OpenCL and libdispatch.

    36. Re:Obj-C by gnupun · · Score: 1

      And you keep that low-level control by calling objc from Swift on rare occasions. But for normal apps, objc is quite tedious. Why do you think Apple invented Swift if objc was already good enough? Hint: it wasn't.

    37. Re:Obj-C by Anonymous Coward · · Score: 0

      Ehm no, Interface Builder does not create code at all, that is the beauty of this system.
      Interface Builder is a user interface around an object database, all use interface elements that you use are added to the database, you also add instances of your own classes to the database.

      When you run your application you open this database and all objects in the database will be instantiated, your user interface elements and your code is instantiated and linked to each other. For lazy loading we create separate database that are loaded at runtime, this is recommended for preferences windows, so that your application will load even faster.

      It is also easy to runtime configure user interface elements to do specific things. And it does not require you to modify generated code, thank god. The whole thing keeps being maintainable for long term projects (unlike code generation tools).

    38. Re:Obj-C by Bite+The+Pillow · · Score: 1

      CLR in this context means a very large standardized library, which is not subject to fragmentation nor availability. It runs or it doesn't, and it behaves as documented (by google or stack overflow, not necessarily MSDN).

      You can care about performance and study the IL, or ignore it and use Linq for elegant and readable one liners.

      I won't address the remainder, as that is where you professed ignorance. Aside from lightweight, where you made a good point in support despite not understanding.

    39. Re:Obj-C by Anonymous Coward · · Score: 0

      Programming Revolution for the embedded space:

      C/C++ | -> vs Rust vs Swift vs Golang vs D vs M#???

    40. Re:Obj-C by maccodemonkey · · Score: 1

      CLR in this context means a very large standardized library, which is not subject to fragmentation nor availability. It runs or it doesn't, and it behaves as documented (by google or stack overflow, not necessarily MSDN).

      That's not what the term CLR actually means (http://en.wikipedia.org/wiki/Common_Language_Runtime) nor does that necessarily apply to Swift. Swift does indeed have a slightly larger core function base than Obj-C, but still not enough to build an entire app. For example, there is no I/O (either file or console, except for printing to console), networking, or GUI support that is part of the core implementation. You won't be building much with the Swift core library by itself.

      Here's a list of every single function present in the Swift standard library in June. That every single function can be listed on a web page should tell you that it's nowhere near as expansive as the Java or .Net standard libraries:
      http://practicalswift.com/2014...

      It's primary API intended use API is Cocoa, but that is entirely un-attached from the language. As of posting time, Cocoa is still entirely written in Obj-C, so the primary library intended for use by Swift is not even written in Swift itself. But I digress, Swift itself definitely does not have a very large standard library. When Swift is ported to other platforms you won't see Cocoa anywhere with it. And Cocoa is different on iOS and Mac, so even if you're sticking to Apple platforms you don't have a common library between the platforms. So right there, even if we decide Cocoa could be called Swift's standard library (which it isn't) it fails the fragmentation test you've put forward.

      Not to mention, the R in CLR stands for runtime, and we're talking about the Swift standard library, not the runtime (which is the Obj-C runtime, not the Swift standard library anyway.)

    41. Re:Obj-C by lucm · · Score: 2

      He is clearly not a Swift learner!

      --
      lucm, indeed.
    42. Re:Obj-C by phantomfive · · Score: 1

      Anyone who says 'X' language is crap, can safely be ignored.

      Interesting, I usually think "Anyone who says 'X' language is not crap, can be safely ignored. They're all crap. :) Programming is still far from what it could be.

      --
      "First they came for the slanderers and i said nothing."
    43. Re:Obj-C by Anonymous Coward · · Score: 0

      I am excited by Rust too. I would like to shoot the authors of this crap with a machine gun.

    44. Re:Obj-C by Sudline · · Score: 2

      LLVM comes from the University of Illinois, not from Apple.

    45. Re:Obj-C by silfen · · Score: 2

      What Obj-C has now is something called ARC (Automatic Reference Counting). At compile time (not run time) the compiler does a static analysis of the code and determines where it needs to add memory management code, and then quietly does so for you. This means there is no run time hit, and behind the scenes everything is still manual memory management. Sometimes you still need to hint to the compiler what to do (usually when trading pointers with C), but 99.99% of the time it just works.

      Automatic reference counting means adding retain and release messages automatically; there most certainly is a runtime hit, and that's on top of the usual memory allocator costs, which can be quite high. A good compiler can eliminate some of those retain/release calls. Furthermore, because of deallocation cascades, a release message in such schemes can have a very high latency (don't know whether Apple tried to add workarounds). And, of course, ARC has the same problems with circular references that regular reference counting has.

      Reference counting is a mediocre memory management scheme at best; people use it in C-like languages because they don't have a choice. It is inferior in just about every way (runtime overhead, latency, memory utilization) to a good garbage collector.

    46. Re:Obj-C by taharvey · · Score: 2

      LLVM was originally developed by Chris Lattner , Apples VC of Dev Tools. He joined Apple right after he developed the first version. And He and Apple have kept on driving and developing the project. You'll notice that the top 10 devs on the project are full time Apple employees. It would be hard to say LLVM is anything but a Apple project, under Apple's primary control

    47. Re:Obj-C by Dahamma · · Score: 1

      So... based on your later posts you have never even USED Objective-C but you lucked out on /. First Post. Yay for useless comments!

      And trashing Apple in the process, nice.

      Objective-C is a semi-painful language but in my experience SO much more efficient than Android's choice of Java. There is a lot of misinformation about Swift but the reality is its development was headed by the lead dev of Clang who was also responsible for a lot of the innovations in Objecive-C. His goal *was* in fact to replace Objective-C with a more modern language, and despite more incorrect claims it is as natively integrated into the Apple toolchain as Objective-C.

      That said, I'd compare Swift with early versions of Scala - uses an existing runtime, "modernized", more functional, and dynamic syntax, lots of random bugs and occasional brain farts.

      I have only experimented a bit with Swift so far, but that experiment has been that the majority of functionality is much more expressive (like Ruby) than Objective-C, but once in a while you get bitten with something that is a complete PITA to do (because of the language or the bindings to current APIs). Because of that I decided to stick to Objective-C for now - but I'm guessing Swift will become fairly popular in the next year or so...

    48. Re:Obj-C by Anonymous Coward · · Score: 0

      Agreed on the "relative" aspect of may critique. I agree with your c++ critique as well.

    49. Re:Obj-C by Cyberax · · Score: 3, Insightful

      Java is just as fast in the RealLife(tm) as C++. Or more exactly, I'll write a fast-enough Java application faster than you'll write a third of it in C++. And Python for efficiency? Don't make me laugh.

      Swift right now is a slow toy with incoherent semantics (lambdas and no GC, really?). It has _NO_ real advantages over Rust as they both use the same LLVM ecosystem for the backend. And I don't get where you got the idea that Swift uses any kind of JIT, it's a strictly compiled language like Rust. Compile speed of Rust is excellent (it's self-hosting, so there's a fair amount of code to compile) and by now Rust's design is mostly finished.

      But of course, as we know, Apple has invented programming languages.

    50. Re: Obj-C by Anonymous Coward · · Score: 0

      Oh really? When I was doing multimedia development on android I actually found it very handy to look at the android source code of the multimedia frameworks. Sure I could not look at the source code of the actual device I was using, but the core android frameworks are the same in the AOSP.

    51. Re:Obj-C by loufoque · · Score: 1

      Swift is native.

    52. Re:Obj-C by martin-boundary · · Score: 1

      Don't waste your time with these Old Testament languages, the New Testament is C++11: "And on the seventh day, after writing the new C++ Standard nonstop, Chuck Norris rested and was well pleased, for it was good..."

    53. Re:Obj-C by loufoque · · Score: 1

      Swift does not have the syntactical goodness of ruby and python any more than C++.
      It also cannot challenge C for several reasons, including the fact that it's very slow at working with native types such as integers because it tries too hard to be safe.

    54. Re:Obj-C by loufoque · · Score: 1

      From a developer's perspective, they're the same.
      You just code with C++ and Clang for both of them, then have to suffer a framework in a braindead language to do the UI.

    55. Re:Obj-C by loufoque · · Score: 2

      So basically you're complaining because you wrote bad code that only worked due to Visual Studio not following standards and that on top of that you don't know how to read template error messages?

    56. Re:Obj-C by Anonymous Coward · · Score: 0

      So? iOS is making everyone run BSD. Even better than making them run Linux.

    57. Re:Obj-C by serviscope_minor · · Score: 1

      It is inferior in just about every way (runtime overhead, latency, memory utilization) to a good garbage collector.

      It's certainly not inferior in terms of memory utilization because it's precise in that it deallocates as soon as the last object pointing to it disappears, whereas in normal GC, you have to wait for the allocator to run.

      --
      SJW n. One who posts facts.
    58. Re: Obj-C by Anonymous Coward · · Score: 0

      This. Ignorance must be a bliss.

      Fyi, Python is widely used in the data science community for both its leight-weight syntax, the extent of the ecosystem, the cross-platform ubiquotous availability, and - wait for it - the execution performance. For the same reason, many web application developers prefer Python or Ruby, cobined with a framework such as Django or Rails.

      One of the major differences between Java and Python/Ruby is the level of abstraction that programmers write code in. In Java you are forced to think think a lot about syntax, and some 30% of your code will be just to hide these lower levels from the rest of your code. with Python or Ruby you get to pretty much type away your logic in plain English. Which approach is faster and produces less code? You bet.

      Btw, Java is interpreted the same way that Python and Ruby are: source code gets compiled into byte code and then executed by a byte code interpreter. Just like with Java, several Jit-capabale runtimes are available.

    59. Re: Obj-C by Anonymous Coward · · Score: 1

      Java has lightning fast compilation times? Not sure whats your definition of lightning faat, but last time I checked, the code-compile-run cycle of my Python project was much faster than the maybe half as big (in terms of functionality, not LOC) Java apps that I used to write before that....

    60. Re:Obj-C by Anonymous Coward · · Score: 0

      At least give people an answer to this: what's the worst thing about Java?

    61. Re:Obj-C by Anonymous Coward · · Score: 0

      The age of Obj-C is irrelevant. It remains superior to Java, even though Swift has now exceeded it.

    62. Re:Obj-C by jcr · · Score: 1

      Anyone who says 'X' language is crap, can safely be ignored.

      Unless they're saying it about Java.

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    63. Re:Obj-C by jcr · · Score: 1

      The popularity of Java demonstrated just how desperately the world needed something better than C++.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    64. Re:Obj-C by jcr · · Score: 1

      nobody liked Pascal/Delphi and there was very little useful business logic implemented in those languages

      I beg to differ. While I never used it myself, I do know of several trading systems implemented in Delphi that worked very well indeed.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    65. Re:Obj-C by jcr · · Score: 1

      It involves writing tons of boilerplate code for the GUI

      That statement alone tells any experienced Mac or IOS developer that you have no idea what you're talking about.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    66. Re:Obj-C by BasilBrush · · Score: 2

      Interface Builder generates a bunch of boilerplate obj-c code for you.

      You know not what you speak of.

      Interface Builder doesn't generate any Obj-C code. Interface builder creates XML .XIB files which are compiled into object stores with a .NIB extension. Those objects are Obj-C runtime objects. But there is no boilerplate code that creates them. The application simply asks for a nib file and all the objects within it are created.

      As such Obj-C exposes LESS of the "plumbing of the GUI" than the languages you mention whose visual designers DO generate boilerplate code.

    67. Re:Obj-C by philip.paradis · · Score: 4, Insightful

      public class HelloWorld {
          public static void main(String[] args) {
              System.out.println("Hello, World");
          }
      }

      --
      Write failed: Broken pipe
    68. Re:Obj-C by BasilBrush · · Score: 1

      I'd bet the majority of budding iOS developers start their first project using Interface Builder. It works pretty well if you don't stray too far from the Apple "look". But once you want to do something novel, you start spending more and more time working around IB than with it.

      That's much less true with XCode 6. On the one hand it's now very easy to incorporate your own custom controls in IB, such that you can actually see what you're going to get. And on the other hand dealing with constraints and size classes in code rather than IB is no fun at all.

      And god forbid you want to collaborate with other developers via version control. Having to manually 3-way merge a couple thousand lines of XML causes IB to quickly lose its shine...

      Yes,that's definitely one to avoid. Perhaps better to stick with xibs rather than storyboards when an app is being worked on by a team. Shouldn't be too difficult to arrange to only have a single coder working on a particular view at a time. (In closed source environments.)

    69. Re:Obj-C by philip.paradis · · Score: 1

      n/t

      --
      Write failed: Broken pipe
    70. Re:Obj-C by BasilBrush · · Score: 1

      It also cannot challenge C for several reasons, including the fact that it's very slow at working with native types such as integers because it tries too hard to be safe.

      What a stupid thing to say.

      First of all because you are repeating things you heard whilst Swift was in beta. It got a lot faster. Comments were made based on non-optimised compilations.

      Secondly, for most purposes being correct is far more important than being faster. We've had decades of experience of the bugs and security vulnerabilities that Cs unchecked nature gives.

      Thirdly if you don't want the checks you just switch them off in the compiler options. The norm of course being to have more checks in debug builds than release builds.

      And Fourthly, having a way to express more invariants to a compiler, such as whether or not a pointer can be nil, results in FASTER code because better optimisations can be done. e.g. For correct C code you very often need to write manual checks on whether a supplied pointer is nil. In Swift this is not normally necessary for the programmer nor the compiler to do.

      If you have a link to some benchmarks of the released version of Swift vs C, with appropriate optimisations, then we can see if there's any truth in it for v1.0 of Swift. And even then we don't know how much faster Swift will get in future releases. It certainly isn't impossible for it to be faster than C. Your assumption is wrong.

    71. Re: Obj-C by Anonymous Coward · · Score: 0

      All those python modules are actually written in C for performance reasons. The python code is just a wrapper to C so that you can do python scripting in a convenient way. It is not a C replacement though.

    72. Re:Obj-C by occasional_dabbler · · Score: 1
      I admit the anti-Apple trolling in my first post. Sorry about that. It was late and I'd had a drink or two...

      I didn't say I haven't used obj-C, just not much, not recently and really only to experiment to see if it would be a good choice to use for my particular Python/Fortran based project. It was the Python bindings that made me take a look and I particularly liked how I could use dynamic typing and garbage collection, making it a good 'fit'. I was amazed by the quality of the Apple developer tools too.

      The point I should have made was partly made by others later, namely that obj-C is well established and integrated in the toolchain and since all the frameworks are written in it it makes sense to choose it as his first language. Not to say that he should ignore Swift, but to leave it until he's got obj-C nailed.

      --
      "Our opponent is an alien starship packed with atomic bombs," I said. "we have a protractor"
    73. Re:Obj-C by gbjbaanb · · Score: 1

      You'll find that the predominant language of the time was C, not C++. I know a lot of people can't make the distinction but they are the ones who can;t be told anything.

      In addition the C++ of 1980s is a different beast to the C++ of today, back then it was practically C with classes, not a bad extension, but not anything truly different. I think it was when the STL become popular that C++ turned into a different language.

    74. Re:Obj-C by Hognoxious · · Score: 1

      Swift also has a very nice compile time JIT [...] Swift is beating Rust to the punch [...] Swift had 200,000 devs download the language spec in the 1st 24 hours. [...] Swift is backed by a huge amount of Apple dollars.

      Is it webscale too?

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    75. Re:Obj-C by geoskd · · Score: 1

      Plus it's not like C++/ObjC have no runtime. For example, if you don't have the right VC++ redistributable installed, you'll get nowhere trying to run C++ application compiled in VC++. Their runtime just doesn't include a JIT compilation stage (for better or worse)

      If your only experience with C / C++ is MS VSxxxx, its no wonder you hate the thing so much. The MS tool chains have never been standards compliant, and they have absolutely zero qualms about breaking their customers legacy code just for random changes. When are developers going to learn their lesson and stop relying on MS for anything they don't have to. You end up locked to MS and they can do whatever they want to you (including large scale cash withdrawal).

      That having been said, c++11 is actually a rather more modernized language, but you can bet MS will never fully or properly support it. They prefer to add their own idiot solutions that lock people to MS. A good example of this is the TerminateThread function in VC++. On the surface, this function seems very useful if you have no idea how multithreaded system should work. There is no equivalent in C++11, and in fact, POSIX has no real support for the concept at all. The reason is that the functionality that this provides is a monumentally bad idea, and there are absolutely zero situations where using this would be a better / easier/ faster solution than the traditional multi threading algorithms. In fact, this function is extremely difficult to use in a way that doesn't cause all kind of program stability problems, and if a programmer is even slightly tempted to use it, odds are they simply don't understand the implications, and should seek outside help understanding multi threading.

      Microsoft VC++ has thousands of little land mines like that, making it a horrible platform to use as a basis for any project. Never minding vendor lock in, the development environment itself is badly flawed.

      --
      I wish I had a good sig, but all the good ones are copyrighted
    76. Re:Obj-C by Jeeeb · · Score: 1

      So basically you're complaining because you wrote bad code that only worked due to Visual Studio not following standards and that on top of that you don't know how to read template error messages?

      No smartarse. The VC++2012 Chrono did have bugs and fail to conform to the standard but afik my code was compliant. VC++2013 fixed the VC++2012 bugs and introduced a new set of its own (http://stackoverflow.com/questions/24586804/c11-chrono-in-visual-studio-2013)

      Compiles in GCC/Clang/VC++2012 but not VC++2013**:
      std::chrono::seconds a(10), b(20);
      auto test = a / b; // Could also be uint64_t test = a / b;

      ** Disclaimer: I'm on Linux at home and so can't test that particular block. uint64_t test = a /b; definitely fails iirc

    77. Re:Obj-C by Jeeeb · · Score: 1

      If your only experience with C / C++ is MS VSxxxx, its no wonder you hate the thing so much. The MS tool chains have never been standards compliant, and they have absolutely zero qualms about breaking their customers legacy code just for random changes. When are developers going to learn their lesson and stop relying on MS for anything they don't have to. You end up locked to MS and they can do whatever they want to you (including large scale cash withdrawal).

      To be clear I don't hate C++ at all. I find it a very powerful and expressive language but if the project requirements allow for it I'd rather use Java/C#. They're much more productive language to program in imo. No waiting for compiles, better tooling (e.g. refactoring), nice runtime errors, and the relative ease of integrating third party libraries being the main factors.

      Couldn't agree more with you about Microsoft VC++. Clang is sooo much nicer.

    78. Re:Obj-C by silfen · · Score: 1

      It's certainly not inferior in terms of memory utilization because it's precise in that it deallocates as soon as the last object pointing to it disappears, whereas in normal GC, you have to wait for the allocator to run.

      Actually, with a GC, from a programmer's point of view, memory is available as soon as it has become garbage; the collector is just run transparently when necessary; there is no more "waiting" than for malloc/free. In addition, because of fragmentation, having the same amount of active memory may take a lot more space in Objective-C and the memory you freed may not be usable. And reference counting often retains pointers longer than necessary, with objects retained only for the release call, where in a garbage collected system, the reference would be optimized out. In practice, there is also a good chance you have circular references and memory leaks with reference counting.

    79. Re:Obj-C by taharvey · · Score: 2

      Here is what you are missing:

      LLVM is enabling new languages that blur the lines between JIT and compiled. LLVM can do either. Right now Xcode JIT compiles code as you type in C/C++/objC. It is also used in openCL as a runtime JIT to compile C code to the target runtime platform (CPU or GPU). Now with Swift they have leveraged that ability further to JIT in a hot-coding environment... which is really the main advantage of interpreted and JITed languages: coding efficiency.

      If you don't understand why GC is a bad idea better left in the 90s, read this: http://sealedabstract.com/rant...

      There is reason Apple depreciated GC in objC for reference counting! The main jist is this: to get reasonable performance out of a GC system (meaning still 25-50% slower than manual memory management, you will need 6-to-10 times the RAM of say a C program. While this isn't a big deal on a desktop running a trivial application, this is a very expensive tradeoff in a mobile application. Lattner anticipated this problem many years ago when Apple was getting into mobile devices, and developed ARC for the compiler front end to provide a better solution, that is much more light weight.

    80. Re:Obj-C by taharvey · · Score: 1

      Oh yeah, the Java is just as fast in real life thing... Please. Again read that article. While it is mostly about javascript, it all still applies to java.

      A JIT is going to be a least 2x slower minimum no matter what for any nontrivial... there is no magic to get around that. Then throw on GC, that will slow it down another 50% or so. Then put it on a mobile platform that is already 10x slower... Of course Java can never be a systems language, there aren't pointers or anything similar. It isn't the way forward, that is for certain.

    81. Re:Obj-C by Trepidity · · Score: 2

      It is now under the primary control of Apple, certainly, but it didn't "come out of the Apple compiler group" as you erroneously stated. It came out of the University of Illinois's compiler group. In addition, Lattner was not the only person developing it there.

      It is true that LLVM has been Apple-driven since 2005, but it didn't come out of Apple— they picked it up after it was already out there.

    82. Re:Obj-C by taharvey · · Score: 1

      I disagree. C++ is such a crazy language with so many nooks and crannies and 30 years of cruft, when we sit down to discuss what *shouldn't* be allowed in our programs (no boost, etc, etc)... we end up back at C with a few extras. It would be nice to have a sane language that doesn't take 5 years of expertise amongst all of the team members, before you can address what *shouldn't* be used

      Swift, like rust provides all the pointer goodness if you want to use it. Also provides the ability to intermix C code without interfaces

    83. Re: Obj-C by BarbaraHudson · · Score: 1

      If you use a well-designed makefile instead of an ide, there's no reason the code-compile-run cycle of a java app should be slower than a python app. Unless, of course, you put all your program into one humongous class, in which case you're either doing it wrong, using the wrong tool for the job, or writing something very trivial.

      That being said, python has its uses, but to say people should prefer one language over another in part due to compile times, in this day of cheap multi-core cpus ... why don't you just say "get off my lawn" and be done with it?

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    84. Re: Obj-C by cerberusss · · Score: 1

      Java is just as fast?

      Can you explain to me why it takes a minute to start Tomcat and deploy its (single) WAR file? But when I start my C++ server, including all its daemons, it takes a second or two?

      --
      8 of 13 people found this answer helpful. Did you?
    85. Re:Obj-C by loufoque · · Score: 1

      If you choose to restrict yourself to a subset of C++ where you can't use any nice features, then sure, C++ is the same as C.
      But that's not what C++ is.

    86. Re:Obj-C by angel'o'sphere · · Score: 1

      Hm, perhaps we two sit together and design a few languages :)
      I designed a few but the higher level ones I never implemented.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    87. Re:Obj-C by angel'o'sphere · · Score: 1

      Your claims about GCed languages would need more RAM or would spend more time with memory management than manually memory management is simply wrong (and you seem not to understand the speed costs or other drawbacks of reference counting either).
      Bertram Meyer disproved your claims in the early 1990s.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    88. Re:Obj-C by angel'o'sphere · · Score: 1

      UCSD Pascal was once the platform/language with the most lines of code implemented in it and the most actually installed systems.
      Turbo Pascal was once the predominant language for CPM and DOS and early Windows.
      If you don't like Pascal, you are an idiot.
      I'm still tempted to implement an Xtet/Xpand based Pascal for the JVM. Pascal is the best language to teach in, never saw anything (except Modula 2) remotely close to it.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    89. Re:Obj-C by phantomfive · · Score: 1

      I designed a few but the higher level ones I never implemented.

      Interesting, what kind of design did you have for it?

      --
      "First they came for the slanderers and i said nothing."
    90. Re:Obj-C by angel'o'sphere · · Score: 1

      Ofc it is inferior.
      It is slower, by magnitudes! And it does NEVER deallocate unreachable objects that circularly reference each other.
      You simply have no clue about GC, and you are to ignorant to realize that you have no clue, rofl.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    91. Re:Obj-C by taharvey · · Score: 1

      Except it isn't. Go ahead a read: http://sealedabstract.com/rant...

      Jump to the graph: "If you remember nothing else from this blog post, remember this chart."

    92. Re:Obj-C by aaaaaaargh! · · Score: 1

      All of these elaborated arguments are primarily valid for companies such as Apple only, who want to save as many costs on hardware as possible in order to be able to rip off their customers even more. Apple has exorbitant profit margins in the mobile sectors.

      I take a language with built-in GC used on a platform with hardware that is fast enough and has enough RAM anytime over a language with inferior memory management on slow hardware. Ditto for applications written in it. With today's hardware it's just plain stupid to do do manual memory management except in high integrity systems that are not allowed to use dynamic memory allocation anyway.

    93. Re: Obj-C by Anonymous Coward · · Score: 0

      Just as C is not a replacement for hand-optimized assembler...

    94. Re:Obj-C by taharvey · · Score: 1

      Really? Your argument is we should waste CPU and RAM resources with inefficient languages, and try and make up for it with lots of hardware?

      Every embedded system has these constraints, not just mobile phones. Welcome to the rest of the world.

      For example. I recently got a Nexus 7 and benchmarked a javascript app against a 3 year old iPad2. 2x cores, 2x the GHz, 4x the Ram. The result? The Nexus 7 was unacceptably laggy in response to user touch and DOM manipulation... compared to a 3 year old iPad. Ridiculous!

      Also, again, if you bother to read that article, there is no magic "throw more RAM at it" solution with systems on a chip. There are RAM limits to what can be integrated onto a SOC

    95. Re:Obj-C by maccodemonkey · · Score: 1

      Automatic reference counting means adding retain and release messages automatically; there most certainly is a runtime hit, and that's on top of the usual memory allocator costs, which can be quite high. A good compiler can eliminate some of those retain/release calls.

      Sure, but I would assume any manual memory management system worth it's salt is doing retain/release. Most of the C++ big libraries do it.

      Furthermore, because of deallocation cascades, a release message in such schemes can have a very high latency (don't know whether Apple tried to add workarounds).

      Two things:
      - Deallocation cascades are inherent in memory management. Neither reference-countless memory management nor garbage collection can avoid it. So I'm not sure what the point here is.
      - As far as latency on dispatches, Apple is using tagged pointers (http://en.wikipedia.org/wiki/Tagged_pointer) which is using some room in the pointer for holding the reference count. In practice, this means means there is practically no latency for messing with the retain count.

      And, of course, ARC has the same problems with circular references that regular reference counting has.

      Which is also a problem with Garbage Collection...

      Reference counting is a mediocre memory management scheme at best; people use it in C-like languages because they don't have a choice. It is inferior in just about every way (runtime overhead, latency, memory utilization) to a good garbage collector.

      I don't see how it is at all. Results are instant. Overhead is far less. Pretty much every claim here needs citation. It's hard to see how an entire process constantly analyzing object references is less overhead than pre-handling those references. Memory utilization? I have to burn a bunch of memory on a garbage collection process, and then watch my memory climb and then drop off a cliff constantly while I wait for the garbage collection to run, while retain counted count generally stays with a pretty stable allocation count because it's instantly computed. Puh-lease.

      I saw your claim below that GC is identical to retain/release in behavior. It really is not. If I clear out a reference in Obj-C or any other retain/release language, the memory is instantly freed. In Java, I have to wait for another run of the garbage collector, which can take a while unless I manually trigger it. Yes, YOU don't have to wait for anything in the code. But ignorance is bliss.

      Here's basically the comparison I'd use: Retain/release is like having an incinerator you throw your garbage into. Garbage collection is like... well... having a garbage truck. In both cases when I'm writing code I can just throw things away in my trash bin and pretend it's not there. With retain/release/an incinerator, the memory is actually gone as soon as I throw it in the trash bin. With garbage collection, I've thrown it in the bin and forgotten about it, but that doesn't change that the trash will continue piling up until the trash guy comes, which may still be a bit away. The large amount of piled up trash is also a problem, and actually makes the cascade problem you were concerned about with retain/release WORSE. Instead of a few cascade relationships being dealloc'd at once, all the dereferenced objects are going to pile up, wait for the garbage collector, and then the garbage collector is going to have to pour through thousands of relationships all in one go, causing the program to come to a halt while everything waits for the garbage collector to catch up. I've had to clean up a few Java messes that had that problem by manually firing the garbage collection to spread out the load.

    96. Re:Obj-C by iluvcapra · · Score: 2

      No no, your boss is going to have a word with you about that:

      class Greeter {
          public void greet();
      }
       
      public class HelloWorld extends Greeter {
          @Override
          public void greet() {
              System.out.println("Hello, World");
          }
      }
       
      public class GreeterFactory {
          public static Greeter getGreeter(String type) {
          if (type == "HelloWorld") {
              return new HelloWorld();
          } else {
              return nil;
          }
      }
       
      public class Main {
          public static void main(String[] args) {
              GreeterFactory theFactory = GreeterFactory();
              Greeter helloWorld = theFactory.getGreeter("HelloWorld");
              helloWorld.greet();
          }
      }

      Java has a reputation as the New Cobol partly because that's how Sun marketed it, but also because it kinda has the soul of a compliance officer.

      --
      Don't blame me, I voted for Baltar.
    97. Re:Obj-C by AqD · · Score: 1

      The runtime is everything that Java and JVM-based and CLR-based languages beat traditional C/C++.

      It provides a base for:
      1.Secure memory access - from which you can be guaranteed that no out-of-bound array access or messed-up pointer writes to unrelated variables and objects undetectably.
      2.Tracking and management of all objects.

      Both features are invaluable for development and debugging, despite it introduces a lot of cost on memory footprint and performance. However, I suppose you never write code with bugs or unexpected behaviors, so you'd never need that.

    98. Re: Obj-C by darkarena9789 · · Score: 1

      Java is verbose, but not crap. There is a reason most of the enterprise software today is written in it. Java's verbosity also makes it intimately readable. If you look at the error streams coming off of most iOS apps today, you'll see why languages like Java HAVE been so popular. That said, this is about swift. Swift is interesting because it promises to make cocoa in its entirety available, it plays nicely with objective C, is simpler to learn and apple claims it's faster. The problem with objective c, like other c's, is it's too close to the object code. Swift promises to have the structure and ease of use of a modern language with the efficiency of native code. And swift DOES PRODUCE native code. I've been playing around with swift and although it lacks a lot of maturity, the promise of using cocoa and nativ objC api's it true. If it were me, I would learn swift and evolve with the technology. It's certainly the direction that apple is taking.

    99. Re:Obj-C by taharvey · · Score: 1

      No doubt these are nice features. Which is why the hybrid approach of Swift is the best of both worlds. JIT live-code at development, compile time speed and memory footprint.

      But some (like Linus T.) would also point-out this as a reason to keep programs in languages like 'C', it keeps the mid level programmers out who need more hand-holding.

    100. Re:Obj-C by aaaaaaargh! · · Score: 1

      Well, isn't it ironical then that Apple has a long history of bloating their operating systems and runtime environments in order to be able to sell new hardware?

      The lesson to learn from this is that GC runtime efficiency is the very least of an issue in light of horrendous operating system, supporting library and application bloat. Not to speak of the #1 performance problem: using inadequate algorithms and data structures.

      Besides, these performance arguments are mostly moot anyway. I'm not claiming that performance is totally irrelevant, I wouldn't use a GCed language for DSP programming either, but I've yet to see things other than pointless tech demos that anyone computes on his mobile phone that could never have been achieved on a phone that is only half as fast. An occasional GC will not do any serious harm to your fart apps and web page wrappers.

    101. Re: Obj-C by Cyberax · · Score: 1

      A minute? My Tomcat installation starts in less than a second.

    102. Re:Obj-C by Anonymous Coward · · Score: 0

      Pretty much every claim here needs citation

      I have rarely read as much nonsense as you managed to cram into that posting. We're not having a scientific debate here, I'm just telling you: you are wrong, so go read up on garbage collection.

    103. Re:Obj-C by Anonymous Coward · · Score: 0

      C++ was well-entrenched before the appearance of Java and the STL was already around.

    104. Re:Obj-C by Dahamma · · Score: 1

      I didn't say I haven't used obj-C, just not much, not recently and really only to experiment to see if it would be a good choice to use for my particular Python/Fortran based project. It was the Python bindings that made me take a look and I particularly liked how I could use dynamic typing and garbage collection, making it a good 'fit'. I was amazed by the quality of the Apple developer tools too.

      Yeah, most of the advantage of Obj-C is in the great tools and libraries. Personally I think someone would be crazy to use it for a project outside of iOS/OSX :)

      (well, I am assuming you were not building a new GUI app in Python and Fortran... I'm sure it's been done...)

    105. Re:Obj-C by ttucker · · Score: 1

      public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World"); } }

      So what? It is bad for writing three line programs?

    106. Re:Obj-C by philip.paradis · · Score: 1

      You just quoted 106 characters to accomplish the following simple task:

      print "Hello, World\n";

      That's 23 characters to accomplish the same task, but the core issue isn't even really the character count alone. It's the verbosity combined with the requirement that an object be explicitly constructed to perform something that is a fundamentally procedural task.

      --
      Write failed: Broken pipe
    107. Re:Obj-C by Ronin+Developer · · Score: 1

      I, too, would beg to differ. As someone who has used the language / IDE since Delphi 1.0, I have to think you are probably a Microsoft/VB fan.

      I worked for several companies whose products were written in Delphi. One application was a leading records management system for law enforcement and comprised over 1 million lines of code. Another was a commodities trading application that used JNI to communicate with a large collection of Java files. Another managed slot machines at a very large casino and interfaced with the AS/400.

      Today, at version Delphi XE7, the tool can still develop native Windows apps. But, it can also cross compile to produce native OSX, iOS and Android apps (via the NDK). The language has evolved as well. Granted, the verbose syntax of Pascal still exists. It should be said, however, that .Net and C# were created by Delphi's creator (Anders Heidelberg) after he defected away from Borland.

      The tool ran into some hard times due to some shakeups at Borland. Borland became Inprise (yeah, stupid name). People screamed but the damage was done even though they chose to rename themselves again from Inprise back to Borland. Borland spun off it's application tools division to concentrate on application lifecycle management tools. The spin off became CodeGear and operated on a small budget. Eventually, Codegear was acquired by Embarcadero which has had it's share of issues. Today, Borland is a shell. Biggest issue with the sell to Embarcadero was the concentration of release a product that was buggy and at a high price. They locked people into a costy upgrade path. They learned and have fixed a lot of issues. But, the high cost forced many shops and developers away from the product. Microsoft became the standard.

      XE7 is an amazing tool if you want to develop Windows, OSX, IOS and Android apps. Database support is fantastic (I have the Enterprise version). It has UML modelling and code generation capabilities. And, now it supports tethering between mobile apps and the desktop over WiFi and Bluetooth (including LE) among many other cool features.

      Before you knock the tool and language, you should actually try to use it. The only downsides are still the price and the fact that you still need a Mac to compile for OSX and iOS. This is more a limitation of Apple requiring the apps to be signed and the XCode tools are needed for this purpose. And, it doesn't develop web apps. If you want to be in that market, you need to select another tool. They used to include the FreePascal compiler for its ARM support. They now have their own native ARM compiler.

      They have a 30 day trial for download. They also have another product, called AppCode, that is very similar to Delphi/RadStudio. That product is offered on a monthly subscription basis vs outright purchase. Not sure of it's other limitations.

      The 3rd Party ecosystem took a hit for a while with many of the vendors moving towards .Net during the shakeup at Borland and haven't returned. Some of those vendors also felt shafted by both Borland and Embarcadero when they decided to offer products in those 3rd parties spaces and cut them out of the deal. Recently, there has been a lot of new release of components (old and new) on sites such as Torry.net.

      While I still code in other languages when necessary, I still prefer to code in Delphi for my personal work. Sadly, it's personal as few enterprise IT shops will consider it these days because of the shakeups.

    108. Re:Obj-C by sydneyfong · · Score: 1

      Furthermore, because of deallocation cascades, a release message in such schemes can have a very high latency

      Right. When gc happens, good garbage collectors don't freeze the whole application for hundreds of milliseconds to scan through the allocated memory looking for objects to free.

      --
      Don't quote me on this.
    109. Re:Obj-C by ttucker · · Score: 1

      You just quoted 106 characters to accomplish the following simple task:

      print "Hello, World\n";

      That's 23 characters to accomplish the same task, but the core issue isn't even really the character count alone. It's the verbosity combined with the requirement that an object be explicitly constructed to perform something that is a fundamentally procedural task.

      So all of Java is garbage, because it is not enough like a scripting language?

      You liking Python better is not a good enough reason for Java to be dismissed as trash, and it hardly justifies claiming it is worse than C++, of all the verbose garbage languages.

      Try Groovy.

    110. Re:Obj-C by philip.paradis · · Score: 1

      You seem confused. Please try reading this thread again, starting with the original post I replied to. Also, the counter-example I provided in my last reply isn't Python. Before opening your mouth to speak, you should probably be reasonably certain you know what you're talking about. Cheers.

      --
      Write failed: Broken pipe
    111. Re:Obj-C by Anonymous Coward · · Score: 0

      return nil;

      That's not Java you have written there!

    112. Re:Obj-C by serviscope_minor · · Score: 1

      I think you misunderstand my point.

      In order for memory to be reused, the collector has to run, whereas with reference counting the memory is available instantly (plus the time for the slower allocation routines to run).

      There's a number of papers which have evaluated the performance of GC against optimal memory management (the one that frees memory as soon as it is not needed). For about 2x the usage, the GC doesn't have much penalty, so the advantages of faster allocation etc of GC start to show. However it asymptotes towards infinite CPU as the memory usage approaches the optimal bound.

      GC requires the optimal amount of memory multiplied by some constant to be efficient, whereas RC does not. In other words, RC uses the memory more efficiently. If you have memory to spare, GC can win[*], but if memory gets tight, RC will win.

      The other point is that languages that do mamagement with RC typically include C, C++ and ObjectiveC all of which are also capable of doing stack allocation, which is faster than GC, so that complicates matters a bit.

      --
      SJW n. One who posts facts.
    113. Re:Obj-C by serviscope_minor · · Score: 1

      u wot m8?

      --
      SJW n. One who posts facts.
    114. Re: Obj-C by Anonymous Coward · · Score: 0

      This is ot but from all experience that i had so far the worst part of any language is developers using it. The fact that java is 'thought' at universities makes lots of people think they know how to do java based development which is just silly. Most of them think that gc makes any conciderations over data structures and data use obsolete which is even more silly. Similar you can say about any other language. The good thing is however that garbage they produce makes redesign necessary and very expensive thus keeping us off the streets. Moreover the skynet will most likely crumble under its weight which is a bonus too.

    115. Re:Obj-C by angel'o'sphere · · Score: 1

      I'm tired about hobbyists trying to brag with their half knowledge: https://archive.eiffel.com/doc...
      That is just an introduction. It is pretty difficult to write manual memory management code that is as fast as "the optimal" gc.
      Perhaps you like to read the "arguments for" and "arguments against" GC in this article: http://www.berenddeboer.net/ei... (note: the arguments "against" get debunked or put in bettter light at least ;D)
      Or perhaps you like to read something from an expert: http://www.cs.kent.ac.uk/peopl...
      Or simply google/search for the old Eiffel versus C benchmarks of Bertram Meyer. He compared about 30 Eiffel programs with their corresponding C programs. The "specialized" Eiffel GCs where nearly always faster than the manual crafted C code, and half of the C programs had bugs regarding memory management.

      Interesting article you linked, but many mistakes. And not really related to the core question or core statements :D

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    116. Re:Obj-C by silfen · · Score: 1

      When gc happens, good garbage collectors don't freeze the whole application for hundreds of milliseconds

      Correct, good garbage collectors don't freeze the whole application under any circumstance.

      to scan through the allocated memory looking for objects to free.

      Garbage collectors don't "look for objects to free", they usually don't "free objects" at all.

      Really, read up on garbage collection.

    117. Re:Obj-C by silfen · · Score: 1

      There's a number of papers which have evaluated the performance of GC against optimal memory management (the one that frees memory as soon as it is not needed). For about 2x the usage, the GC doesn't have much penalty,

      Those are benchmarks of GC algorithms, not entire GC systems. In a real-world, multi-generational GC, that 2x only applies to recently allocated data, not the entire heap (it also only applies to pointer data, not all data). As your heap fills up, this becomes smaller and smaller, so while the GC runs more frequently, it takes less time each time.

      If you have memory to spare, GC can win[*], but if memory gets tight, RC will win.

      GC-based systems can work down to essentially no free memory (and even do so reasonably efficiently). RC-based systems suffer from fragmentation and can fail even if there is a lot of free space available.

      To combat fragmentation to at least some degree, RC-based systems need to maintain internal data structures that add significant runtime and space overhead, overhead that GC-based systems also don't have.

      RC is likely the best solution possible for Objective-C, but that's a limitation of Objective-C, not of GC, and it's not a good solution.

      The other point is that languages that do mamagement with RC typically include C, C++ and ObjectiveC all of which are also capable of doing stack allocation, which is faster than GC, so that complicates matters a bit.

      Many languages with GC are capable of stack allocation in some way; other languages simply have GC that is so fast that they dispense with a stack altogether.

    118. Re:Obj-C by serviscope_minor · · Score: 1

      Yes if fragmentation happens then GC wins.

      However, unless you track writes, you do have to keep rescanning the entire heap (or whichever fraction is pointer data).

      Many languages with GC are capable of stack allocation in some way; other languages simply have GC that is so fast that they dispense with a stack altogether.

      This I disagree on: nothing beats free. The jvm has one of the best GCs in existence yet one of the analeses is escape analysis which tries to replace GC allocations with stack ones since the latter are faster.

      --
      SJW n. One who posts facts.
    119. Re:Obj-C by taharvey · · Score: 1

      I don't see any support for your claim at all.

      Apple has typically supported the last 3-4 generations of devices with new updates. iOS8 just released supports phones back to the 4s, which was released back in 2011. Given that *no other* manufacturer has anything close that kind of OS upgrade support history, I really don't see how you can knock Apple at all on this point. (if you compare the install rate you can get a good picture of this in 1 week iOS8 was installed on 50% of the user base, compared to just 25% of KitKat after 10 months)

      These performance issue are huge! The Android team made the wrong choice with Java. essentially they have saddled Android with the need of 2-3x the CPU and 4X the RAM to do the same things as an iPhone. Not only does that cost money (and profit), but it sucks battery life, requiring bigger fatter batteries.

    120. Re:Obj-C by Anonymous Coward · · Score: 0

      However, unless you track writes, you do have to keep rescanning the entire heap (or whichever fraction is pointer data).

      Yes, good garbage collectors need compiler support, support that an Objective-C compiler can't provide.

      The jvm has one of the best GCs in existence yet one of the analeses is escape analysis which tries to replace GC allocations with stack ones since the latter are faster.

      Java, the JVM, and its runtime are pieces of sh*t. Even Objective-C is better than that.

    121. Re:Obj-C by david_thornley · · Score: 1

      I don't particularly like Pascal and I'm not an idiot.

      Look at C. It's got all sorts of problems. It's hard to parse. The operator precedence is screwy. The switch statement is defective by design. I could go on. Yet, it took over from Pascal, relegating it to a niche (Delphi diehards and the like). It was going to win on Unix because it was the native language, but on Microsoft OSes? C had no privileged place there, and it kicked Pascal's butt. If Pascal was that good, why C?

      Nor would I consider it to be a particularly good first language. I'm sticking to Scheme and Python as the best first languages (depending on what you're trying to teach).

      Pascal suffered greatly from being designed as a language suitable for single-pass recursive-descent compiling on a CDC 6600. Unless you write your program in a strict bottom-up fashion, you have to forward-declare your functions, much like C but clumsier. It had no data initialization. The set datatype was neat, but there was no guarantee of being able to have a set of "char" (the CDC 6600 had (usually) 64 characters in the character set, and the size of a set was limited to word size minus one, or 59 bits). Standard Pascal was not a particularly usable language (no independent compilation, etc.), so any actual useful implementation had to have significant non-standard features. I followed its standardization for a while, so after its decline the standard might have become something useful, but not before.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    122. Re:Obj-C by david_thornley · · Score: 1

      Java has some very serious advantages in the enterprise. There's a lot of Java programmers, and Java makes it easy to write mediocre programs and then have other programmers of medium skill read them. For a skilled programmer working on his or her own, with no great previous expertise in Java, it's a lot less attractive.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    123. Re:Obj-C by taharvey · · Score: 1

      True. True. and True.

      Having said that, I see a couple of things coming down the pike. First, Java usage have been in pretty steady continual decline since 2000 (Tiobe). In the last couple of years C has retaken the top spot. (though it is somewhat surprising that there hasn't been a noticeable bump upward in Java use since Android has taken off).

      Universities are largely moving away from Java as a teaching language. It has moved very strongly to Python in the last few years. I suspect this is impacting Java usage quite a lot.

    124. Re:Obj-C by wwphx · · Score: 1

      Another Pascal fan here. I was working for a play-by-mail game company in Tempe in the early '80s (Flying Buffalo) and though their older games were running on a Raytheon 704 with 32k magnetic core memory and punched tape I/O, their new stuff was being written in SCUD Pascal. When I attended their last convention a couple of years ago, I saw the exact same interface for Heroic Fantasy that I saw 30 years ago. The Northstar is long gone, but the code lives on running on Wintel hardware. Sadly the programmer who wrote that stuff passed away a few years ago, I hope they had good source code management.

      --
      When you sympathize with stupidity, you start thinking like an idiot.
    125. Re:Obj-C by angel'o'sphere · · Score: 1

      I believe you mean UCSD (University of California, San Diego) and not SCUD?

      Wow, you mean "play by paper mail"? Or was that already some "email" variation?

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    126. Re:Obj-C by wwphx · · Score: 1

      We jokingly always called it 'SCUD', it was UCSD.

      Yup, computer-moderated, play-by-snailmail games. Flying Buffalo is one of the oldest hobbyist game companies still in existence, still owned by the same guy. He started running games out of a shoebox while he was in the military in Hawaii in the '70s, he got out and bought a computer and a programmer to code the game. Everyone would receive a printout of their positions and status at the start of the turn, you'd write your orders on a turn form and send it in, they'd be entered and batch processed. So (depending on the game: different games had different paradigms and backgrounds) all fleet movements would happen first, then attacks, then cargo load/unload orders, etc. So no one had an advantage by living closer or having faster mail service. They ran like four different games on the Raytheon, the most popular was Star Web, they also had Battle Plan and I think an economic game that was a bitch to run, only one guy could run those. There were a few hundred games of Star Web going on at any given time back then. The UCSD Pascal on Northstar CPM ran Heroic Fantasy, Feudal Lords and I think Star Lord ran on a TRS-80 Model 3(?). Another game, Galactic Conflict, was also run on a TRS-80 by the guy who designed it.

      Later, Rick Loomis (the owner) had an account on The Source, and I think also on Compuserve, and players could submit their turns via email, but I think only Heroic Fantasy could go out that way, I don't remember. It was very useful if you were up against the turn due date and there was no way you could get your orders in on time. Your printout was still sent to you via USPS. Later still, after Star Web and the others were re-written off the Raytheon, that's when they probably gained the ability to send everything through email, though I believe they still do snailmail for some customers.

      Lots of fun. They had a game store up front where I spent countless hours playing Champions 2-3 times a week, sometimes we saw the sun rise.

      --
      When you sympathize with stupidity, you start thinking like an idiot.
  2. C# using xamarin by Anonymous Coward · · Score: 0

    The Xamarin tools allow creating portable mobile apps using C#. The C# is compiled to assembly rather than relying on Mono or .Net.

    1. Re:C# using xamarin by Mike+Buddha · · Score: 1

      I would tend to agree with this. If you intend to develop cross-platform, do yourself a favor and design your applications from the ground up with cross-platform in mind. Anything else and you're going to spend a lot of time rewriting code. That's just the reality of the situation.

      --
      by Mike Buddha -- Someday the mountain might get him, but the law never will.
    2. Re:C# using xamarin by occasional_dabbler · · Score: 1

      I was very tempted by Xamarin but put off by the $$$. Is it as good as claimed?

      --
      "Our opponent is an alien starship packed with atomic bombs," I said. "we have a protractor"
    3. Re:C# using xamarin by hsmith · · Score: 2

      I do all native for my development. But, if you design your business and storage layers correctly, it is all but a few "find and replaces" to convert ObjC to Java. Then all you have to worry about is your UI. Apps that took months to sort out business logic have been ported (business layer) to the other platform in a day.

    4. Re: C# using xamarin by Anonymous Coward · · Score: 0

      Saying ObjectiveC is like Java is not selling me on the language.

    5. Re:C# using xamarin by QuietLagoon · · Score: 2
      If you plan to develop for more than one platform, keep in mind that the greatest amount of effort will be expended as you port the single-platform app to the second platform.

      .
      So, as the parent suggests, start from the beginning targeting multi-platform in your design stages. A small amount of extra effort in the beginning will save you a large amount of work down the road. And your apps will be less buggy.

    6. Re:C# using xamarin by Jeeeb · · Score: 3, Informative

      I was very tempted by Xamarin but put off by the $$$. Is it as good as claimed?

      My company got a few licenses for a project recently since our client wanted it done in C#.

      From version 3 it has the ability to write cross-platform GUI code. The other option being to write Android/iOS GUI code seperately through C# mappings of their native apis. I wasn't responsible for trying the x-plat GUI part out but I do know that ultimately we were unimpressed and elected not to use it, instead developing for Android and later porting the GUI code to iOS. From memory it was just too limited.

      It may be acceptable for routine business apps but then why not just develop them as a web-service and avoid the Apple-tax and pain of dealing with Apple's provisioning cluster fuck. (Seriously why do so many company's want to use iPads for internal apps? Distributing apps on them is a major pita)

      The other pain point for us was third party libraries. In theory you can import jars and it will automatically map them to C#. In practice that doesn't work. We had to support mobile scanners with a laughably bad and somewhat broken API and broken default apps. I ended up writing an Android service to deal with all that crap. When it is time to add iOS support we'll have to write an iOS specific layer.. (iOS bluetooth access is too limited to directly access the scannner so that will probably involve treating it as a keyboard and capturing keystrokes...)

      IMO. the real value is for Windows shops that want to utilize their existing investment in tooling/developer training, reuse existing core-logic code and/or write their core logic once in C#. For places like that it could be worth the several thousand dollars per developer.

    7. Re:C# using xamarin by Anonymous Coward · · Score: 2, Insightful

      No no no no no.

      Cross platform GUI application development has never, and will never work correctly. People buy different platforms because they behave differently, and because they like the behaviour of one platform over the other. Using a 3rd party hack job of a "cross platform" library only gets you into a position where you're making everyone unhappy by making it behave shiftily (compared to their platform) on all devices equally.

    8. Re:C# using xamarin by Anonymous Coward · · Score: 0

      FWIW, http://www.codenameone.com (Java write-once, run 'bout everywhere)

    9. Re:C# using xamarin by Anonymous Coward · · Score: 0

      That only applies to fart apps, though. Real applications give users something they need and really want.

    10. Re:C# using xamarin by Anonymous Coward · · Score: 0

      My dev team at work is exactly as you describe: a Windows shop "that want to utilize their existing investment in tooling/developer training, reuse existing core-logic code and/or write their core logic once in C#."

      We regularly get requests for routine business iPad/Android apps, usually just as an interface to an existing Web application or similar, and every damn time I have to give the customer a lecture on why they really just want a fucking website using something like KendoUI to imitate the native design language of the platform. I have to keep a demo handy just to prove my point.

      Usually just outlining what a pain in the ass it is to maintain all that shit is enough to get them to see the light... especially if they're paying for our support after the fact, since the more time we spend dealing with distribution and cross platform concerns the more they'll have to pay and be roped into steering meetings

    11. Re:C# using xamarin by gbjbaanb · · Score: 1

      amen. The problem is highlighted there.

      If you are writing a LoB app, make it a web application and free yourself from the deployment and upgrade problems desktop apps have. Businesses love webapps for this reason.

      If you're writing a game or similar, you'll want performance and fancy graphics and though you can do it with Mono and unity, they do tend to bog down if you have too much stuff going on, and all use 100% CPU permanently (at least the ones I've used do)

    12. Re:C# using xamarin by angel'o'sphere · · Score: 1

      You obviously never used a cross platform environment or used an App/Application that was written with one.
      Your claim was perhaps true for Java/AWT ... but for Swing, Qt, zApp?

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    13. Re: C# using xamarin by Anonymous Coward · · Score: 0

      never said anything about GUI. code reuse is to be intended mainly for business logic. Then, if the UI is pretty simple, share that too, orherwise build each UI separately, but at least share the remaining 80% of code.

  3. Doesn't really matter! by Anonymous Coward · · Score: 5, Insightful

    Learning the language itself is not that difficult. Learning the SDK and how things work in Cocoa-land is the important part.

    For example, if you need to display a list of of items in a list, an UITableView will work the same regardless of your language choice. You will still need to understand the idiosyncrasies of working with UITableViewDelegate and UITableViewDataSource.

    I would stick to Objective-C for the moment as there are more learning resources online.

    1. Re:Doesn't really matter! by occasional_dabbler · · Score: 2

      True in any modern language; the basic syntax is straightforward but learning the available library ecosystem takes the time

      --
      "Our opponent is an alien starship packed with atomic bombs," I said. "we have a protractor"
    2. Re: Doesn't really matter! by dagamer34 · · Score: 4, Interesting

      Ditto. Because learning the framework takes a LOT longer than learning the language and the fact that the framework was designed with Objective-C in mind, it is foolish to think that you will be able to write a pure Swift iOS app without knowing Objective-C anyway because there isn't enough Swift material out there for Google to find to solve your problems. And unless you *really* enjoy solving those problems on your own, you'd need to convert an Objective-C solution to a Swift one on your own, at which point you are basically learning both languages anyway. So I would say all new iOS developers need to learn Objective-C because writing a Swift-only app would be too painful otherwise. This all changes when The Big Nerd Ranch puts out a Swift book, but there's no indication that is anytime soon.

    3. Re: Doesn't really matter! by Anonymous Coward · · Score: 0

      Precisely this. I tried to dive into OSX and iOS development, and finding the Swift equivalent for any Objective-C code is rather hard.

    4. Re:Doesn't really matter! by kthreadd · · Score: 2

      You have obviously never used Perl.

    5. Re:Doesn't really matter! by ceoyoyo · · Score: 1

      He said modern language.

    6. Re:Doesn't really matter! by cerberusss · · Score: 1

      It's both funny and true :-)
      And I happen to be okay in Perl.

      --
      8 of 13 people found this answer helpful. Did you?
  4. If you 'speak' C by angel'o'sphere · · Score: 2, Insightful

    Why not write it in C and ommit Swift/Objective-C?

    Perhaps easier to port even, but honestly, if you want to use the Frameworks, try Swift.

    There is a reason we have a flodded AppStore market with iOS Apps ... Apples tools are 30 years old, granted. But the rest of the industry simply did not catch up since 35 years.

    Using a text editor to write code for a device like an iOS device, that simply displays the weather or a stock price is so ... 1960s?

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    1. Re: If you 'speak' C by Anonymous Coward · · Score: 0

      Yes thank you, someone with the right idea here. Starting out you can write C and get a better understanding before bringing in obj-c and native extensions. Swift probably has some form of interop to utilize what you can write as well.

    2. Re: If you 'speak' C by Anonymous Coward · · Score: 1

      Nope.

      Well technically, you *could* stick to CoreGraphics (which is all C) and try to write an application. OpenGL even.

      But really, you should at least try wrap your head around the small additions Objective-C makes to C and use UIKit (a level of abstraction higher) and not reinvent the wheel every time you need to draw anything more complicated than a line.

    3. Re:If you 'speak' C by evenmoreconfused · · Score: 3, Informative

      Using a text editor to write code for a device like an iOS device, that simply displays the weather or a stock price is so ... 1960s?

      Well -- 1970's maybe. 1960's were more about drum storage and all that. Even in the early '70s, the 029 keypunches didn't let us correct typos -- you had to hold the "dup" key down to duplicate the bit you got right, and then carry on keying from where the mistake started. The 129's were much better, as they only punched the card after you finished the whole line.

      Although come to think of it, I did write a nice simple weather app in 360/Assembler for a class in 1974.

      --
      No. Well...maybe. Actually, yes. It really just depends.
    4. Re:If you 'speak' C by macs4all · · Score: 1

      Why not write it in C and ommit Swift/Objective-C?

      Perhaps easier to port even, but honestly, if you want to use the Frameworks, try Swift.

      There is a reason we have a flodded AppStore market with iOS Apps ... Apples tools are 30 years old, granted. But the rest of the industry simply did not catch up since 35 years.

      Using a text editor to write code for a device like an iOS device, that simply displays the weather or a stock price is so ... 1960s?

      OP here. Thanks to everyone for all the wonderful info and suggestions!

      I didn't think it was "legal" to target an App Store-bound iOS App in anything but Obj-C and now, Swift. Could I hypothetically write an iOS App in ARM Assembly?

      I'm not a huge OOP fan in general; so the more I can avoid the Heartbreak Of OOP, the better.

      Are there any resources for learning how to use the CocoaTouch APIs from C?

    5. Re:If you 'speak' C by mrchaotica · · Score: 2

      Objective C is a superset of C; therefore, every C program should also be a valid Objective C program. You might need an Objective C shim to access libraries for IO and whatnot, but you could write the core of your app in plain old procedural C if you wanted.

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    6. Re:If you 'speak' C by dgatwood · · Score: 1

      I didn't think it was "legal" to target an App Store-bound iOS App in anything but Obj-C and now, Swift. Could I hypothetically write an iOS App in ARM Assembly?

      I don't see why not. AFAIK, Apple removed the restrictions on developers' choice of programming languages just five months after they added them—probably in response to developers with pitchforks....

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    7. Re:If you 'speak' C by Anonymous Coward · · Score: 0

      You might need an Objective C shim to access libraries for IO

      Actually you don't.

    8. Re:If you 'speak' C by dbc · · Score: 1

      BALR *,13 to you, sir.

      Oh... and:

      0C7 ABEND
      ABORT
      CORE DUMP FOLLOWS

    9. Re:If you 'speak' C by Anonymous Coward · · Score: 0

      hahaha, while technically correct (the best kind of correct), you are at that point, effectively writing obj-c. You're relying on all of the semantics of obj-c (the important part), if not the syntax.

    10. Re:If you 'speak' C by Bogtha · · Score: 1

      It's technically possible to write an iOS application in nothing but C, but it's deeply unpleasant compared with using the right tool for the job. Just learn Objective-C. There's very little more to the language than plain C, but it makes things so much easier. Then, when you're familiar with the platform, pick up Swift. It's by far the better language, but it's a bigger change than C to Objective-C and it's still pretty immature.

      --
      Bogtha Bogtha Bogtha
    11. Re:If you 'speak' C by evenmoreconfused · · Score: 1

      BALR *,13 to you, sir.

      surely it was

              BALR 15,0
              USING *,15

      no?

      PS: I blame this to be the start of the enormous overuse of #define in subsequent decades, as most people thought it was cool to equate R15 to 15 (etcetera) and then write the above as

              BALR R15,R0
              USING *,R15

      leading to the endless nested equating we get in modern C and C++.

      PPS: for the worst such mess ever created, does anyone else remember the COBOL "ALTER" command?

      --
      No. Well...maybe. Actually, yes. It really just depends.
    12. Re:If you 'speak' C by angel'o'sphere · · Score: 1

      You can write iOS Apps in any language you want. E.g JavaScript + HTML5, or Lua, or Python. You only need to bundle the interpreter / runtime with your App, as everything needs to be in one 'bundle', static linked.
      So no: you don't need Objective-C or Swift at all.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    13. Re:If you 'speak' C by dbc · · Score: 1

      Hmmm.... well.... it certainly was a long time ago. So many machines, so many assemblers since then... I may well be mistaken.

  5. Objective-C, if you don't know much about how iOS by Anonymous Coward · · Score: 2, Insightful

    There are way more tutorials and examples for Objective-C than Swift.

  6. Five years of Swift minimum... by Anonymous Coward · · Score: 5, Funny

    I'm already getting barraged by headhunters asking for five years of Swift minimum for contracts now...

    1. Re:Five years of Swift minimum... by Anonymous Coward · · Score: 0

      Must have 5 years Swift experience, 10 years D experience, one century in Javascript, and working time machine.

    2. Re:Five years of Swift minimum... by phantomfive · · Score: 1

      I'm already getting barraged by headhunters asking for five years of Swift minimum for contracts now...

      Put it on your resume, "five years Swift". If anyone asks you to explain, mumble something philosophical about gazelles on the plains in Spain.

      --
      "First they came for the slanderers and i said nothing."
  7. Objective C is 100% compatible with C by Anonymous Coward · · Score: 0

    Since Objective-C is 100% compatible* with C, it might be to your advantage to use Objective-C to write the UI and use native API while continue to use the language you are already familiar with.

    (*) I don't know if Apple 's version of Objective-C is still 100% compatible...

  8. Why start now? by putaro · · Score: 1

    If you've spent this long avoiding modern languages why start now? If you're not interested in object oriented design you're just going to spend your whole time cussing at the frameworks. Just hire a contractor.

  9. Xamarin by Anonymous Coward · · Score: 0

    With Xamarin, you can write apps for iOS and Android in C#. Shared projects allow you to use the exact same code on both platforms. Depending on the nature and architecture of the app, you can get >60% code reuse between platforms. Xamarin is not free, but the benefits far outweigh the cost.

    1. Re: Xamarin by Anonymous Coward · · Score: 0

      Or you could use codenameone which is fully cross platform and works not only on iOS and android but a whole host of other platforms. Its written a very competent team the original dev behind it wrote parts of the jvm.

      Its java so yeah you would need to learn that. But I came from a purely c background and never touched java before the first time I needed to actually use it on a project and came up to speed on the language in less than a month and frankly im not all that bright.

      There is also the javascript html5 framework known as phonegap or cordova. It is a godsend if you dont need low level access to things like 3d. Its probably the fastest way to a working phone app especially if there is a good chance that major ui changes may occur during development time. JavaScript is a royal pain until you get used to its idiosyncrasies but then again so is every other language.

      As an aside if you've been doing systems level development this whole time make sure to invest in a good front end team. The user facing bits are the only part the customer will ever see and frankly us system programmers will waste weeks trying to accomplish what a good ui team can do in a couple of days. Its an ocd thing. Oh crap this button isnt lining up and is 5 pixels to far left I think I will just move this over here and resize thay and... oh crap where did my form just go??

      My advice java and codenameone for anything heavy. Javascript html5 and phonegap for light or rapidly iterating or anything that will be using a webservice backend.

  10. More help is available on Objective-C by notthepainter · · Score: 4, Interesting

    If you're just starting out you're going to be learning a lot, reading blogs, reading stackoverflow, and there is far more Obj-C out there than Swift now. So you since you want fast, not best, Obj-C is the correct choice for you. Not necessarily for everybody, but for you.

    1. Re:More help is available on Objective-C by Anonymous Coward · · Score: 0

      I get the impression that, as things currently stand, a port of obj-c iOS apps to android is relatively straightforward but swift will be far harder, that's obviously in apple's interests if true.
      I saw this comment recently, from Dave Gilbert of wadjet eye games, which suggests that developing for iOS and getting someone else to do ports to android might be an option.

      Yes we do. We always start with iOS, and then send it to a company called Apportable who convert it to Android for us. The iOS port of Deception is in the works and is getting close to finished. So you will see an Android port of that reasonably soon. Epiphany we haven’t started working on yet, but we will soon!

      Apportable advertise their product as objective-c for android, so presumably swift would be a no go.

    2. Re:More help is available on Objective-C by Anonymous Coward · · Score: 0

      Sadly that does not seem a very competent developer really...
      If he is making games, there is almost zero dependencies that would require Objective-C, anyone smart would do the a game with C++ and then get both Android and iOS done with the same code base. Anyone smarter would use Unity to make crossplatform changes that would require almost zero changes to run on any platform.

      I cringe everytime I see people making completely separate versions of the same software in different languages, not only they more than double the development cost, they also increase the maintenance cost by a huge ammount.

      Are you sure you are not a shill advertizing app portable?

  11. Poaching or immigration ploy? by tepples · · Score: 2, Interesting

    Taken at face value, requiring more experience in a technology than the time it has existed publicly would mean they're trying to poach from inside Apple. Perhaps they're trying to satisfy the legal requirements to ensure that nobody in your country is suitable before they can import immigrant workers.

    1. Re:Poaching or immigration ploy? by Anonymous Coward · · Score: 0

      Although your idea is possible I think Occam's Razor is Hanlon's Razor.

    2. Re:Poaching or immigration ploy? by LessThanObvious · · Score: 1

      I think that's just typical recruiter nonsense. Their script says skills are measured in years of experience. Someone proficient with anything means 5+ years. It's a dumb way to filter candidates. If I've worked with a technology off and on over a ten year period, how many years experience is that?

  12. either works if you take advantage of by musikit · · Score: 3, Insightful

    since you are already a C programmer and are talking about maybe moving to android at a future time. i would write as much as possible in C and just bind to the UI with java/objc/swift.

    take advantage of what you know. build wrappers around the java/objc code you will need to you can easily transport that to whatever platform you are on as long as it binds with C.

  13. Neither by Anonymous Coward · · Score: 0, Funny

    Adobe flex. Cross platform, works on everything.

    1. Re:Neither by saccade.com · · Score: 2

      This is fading away. The better solution is something like PhoneGap. This lets you build mobile cross platforms apps in HTML/JavaScript.

    2. Re:Neither by Anonymous Coward · · Score: 2, Informative

      This is fading away. The better solution is something like PhoneGap. This lets you build mobile cross platforms apps in HTML/JavaScript.

      Since Phonegap got bought by Adobe you are better off with the open source port of PhoneGap Apache Cordova.

    3. Re:Neither by Shadowmist · · Score: 3, Insightful

      Adobe flex. Cross platform, works on everything.

      Your choice then... to be good on the platforms you write for, or evenly craptastic for everyone. Cross platform equals lowest common denominator. If you want to put out apps that people will call good... do the extra mile and code for that platform.

    4. Re:neither by macs4all · · Score: 1

      apple's proprietrary[sic]?languages

      So, you, the Great Programmer, thinks that Objective-C is "proprietrary"?

      This proves just how little you know...

    5. Re:Neither by Anonymous Coward · · Score: 0

      Once a Corporation goes bankrupt then I will pick a choice...

    6. Re:Neither by Anonymous Coward · · Score: 0

      Coding uniquely for each platform can mean less functionality, since you waste time writing the same thing multiple times. The best choice between cross platform and platform specific is best decided on a project by project basis.

    7. Re:Neither by thegarbz · · Score: 1

      If you want to put out apps that people will call good... do the extra mile and code for that platform.

      I can with the authority of someone who tries, jumps between and uses a LOT of apps say that the one thing has nothing to do with the other.

      Crap apps are always crap regardless of language and portability.
      Good apps are always good regardless of language and portability.

      Specific function apps coded for specific hardware can be good or crap, but force you down a particular language.

    8. Re:Neither by Anonymous Coward · · Score: 0

      HTML and Javascript - for when you want suicide to seem the attractive option.

  14. Use the best tools for the job by Anonymous Coward · · Score: 0

    If you are writing for iOS, and its green fields, then Swift is a strong contender - you'll get a faster, higher quality output. Keep in mind you can mix and match Swift and C derivatives in the same project, so you can build cross platform stuff that doesn't touch platform frameworks & use it.

    If when , you want to port, re-write in the native tool for that platform. You get to re-use a lot of design & conceptual effort, but if you want an App to appeal to the users of a platform, then damn well build something that is part of that platform, not a bodgy port trying to be another OS, or buy in to the hubris of "oh we know more than the platform vendors about user experience, come and use our cross platform abstraction layer meta platform thats really 2-3 years behind whats available on any platform, as your development target" crap.

  15. Write portable C code for portability by Anonymous Coward · · Score: 1

    "Dalvick and the Android APIs different enough from Swift/Obj-C and CocoaTouch that any 'port' is essentially a re-write"

    Without knowing what kind of apps you're going to write, it's difficult to know if this is feasible, but if you write as much as possible in portable C code, with a layer of Obj-C (iOS) or Java (Android) on top of it, you might be able to maintain a lot of your functionality in a single code base.

  16. Does Swift work on older iOS versions? by LordNimon · · Score: 1

    I'm also about to learn iOS programming. If I write an app in Swift, what is the oldest version of iOS that it will run on?

    --
    And the men who hold high places must be the ones who start
    To mold a new reality... closer to the heart
    1. Re:Does Swift work on older iOS versions? by master_kaos · · Score: 2

      can only deploy to ios7 or newer with swift

    2. Re:Does Swift work on older iOS versions? by angel'o'sphere · · Score: 1

      The question is irrelevant.
      As a deceloper of a 'small company' you can not put Apps into the AppStore that run below iOS 7 (and I woukd not wonder if that is in a few days iOS 8)
      Only companies like MS or Google can still 'update' iOS 6 or older Apps. All others are forced to publish for a newer version of the OS.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    3. Re:Does Swift work on older iOS versions? by LordNimon · · Score: 1

      Are you sure about that? My understanding is that new/updated apps must be "optimized" for iOS 7, but they can still run on older versions.

      --
      And the men who hold high places must be the ones who start
      To mold a new reality... closer to the heart
    4. Re:Does Swift work on older iOS versions? by Shadowmist · · Score: 1

      can only deploy to ios7 or newer with swift

      You're not dealing with the Android market which has a crap ton of people still clinging to Android 2.3 or earlier. New version adoption rate on IOS is the highest for any platform. And every phone that apple sells now runs on 7.0 or better.

    5. Re:Does Swift work on older iOS versions? by Bogtha · · Score: 1

      No, you're right, there's no rule against supporting older versions. Xcode 6, which is the version released just the other day to support iOS 8 development, supports building applications targeting iOS 6 and up.

      Apple have never explicitly required developers to support a minimum version of iOS, they just drop support for targeting older versions in Xcode a few years after release. Xcode 5, which was the most recent version until the other day, still supported iOS 4.3, which is over three years old and has virtually nobody using it.

      --
      Bogtha Bogtha Bogtha
    6. Re:Does Swift work on older iOS versions? by LordNimon · · Score: 1

      In that case, this is one good reason to use Obj-C instead of Swift: to support older iOS devices that cannot upgrade to iOS 7. I have an iPad 1 that is stuck at iOS 5.1. If Apple had a good trade-in program, I would use it.

      --
      And the men who hold high places must be the ones who start
      To mold a new reality... closer to the heart
    7. Re:Does Swift work on older iOS versions? by Bogtha · · Score: 1

      this is one good reason to use Obj-C instead of Swift: to support older iOS devices that cannot upgrade to iOS 7.

      Not all that good a reason. 95% of active iOS users are already on iOS 7+ and that number is growing every day. The only devices that can't upgrade to it are the iPhone 3GS and below, the equivalent iPod touch, and the first generation iPad. There aren't many people using these devices any more.

      I have an iPad 1 that is stuck at iOS 5.1.

      I appreciate that it's frustrating being left behind, but when only 0.66% of active iOS users are on version 5, it's very difficult to justify the extra work involved in supporting them.

      By the time the OP learns to develop for iOS and actually builds his application, the number of people using older versions of iOS will be even lower. Unless you're willing to chase diminishing returns, it's not worth supporting anything beyond the previous major version, and even that's debatable.

      --
      Bogtha Bogtha Bogtha
    8. Re:Does Swift work on older iOS versions? by angel'o'sphere · · Score: 1

      Not related to you but the parents.
      The programmer of "NovoCard" released that for iOS 5 or iOS6, he is now prevented from putting bug fixes for the old release into the AppStore because Apple requires him to release the "new release" for iOs7 and above.
      Your claim that 95% of the users are now on iOS7 and newer is simply wrong, regardless what Apple claims.
      Nearly everyone I know (and has the knowledge how to do it) switched back from iOS7 to iOS6. No one (except the housewife in the car) likes iOS 7 or for that matter iOS 8) on his/her iPad. It is an ugly mess. And buggy like hell ... but well, who am I that I dare to read eBooks with the iBooks app on an iPad 2 running iOS 7 :-/ (close the eBook, come back later, and you are on a different page, what the heck?)

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    9. Re:Does Swift work on older iOS versions? by Bogtha · · Score: 1

      The programmer of "NovoCard" released that for iOS 5 or iOS6, he is now prevented from putting bug fixes for the old release into the AppStore because Apple requires him to release the "new release" for iOs7 and above.

      Are you sure you aren't mistaking that for the fact that he's required to support iOS 7? Where's your source?

      Your claim that 95% of the users are now on iOS7 and newer is simply wrong, regardless what Apple claims.

      Nearly everyone I know (and has the knowledge how to do it) switched back from iOS7 to iOS6.

      Your anecdotes about people you know do not outweigh the statistics gathered across all active users.

      It's not just Apple that say that 95% of people are on iOS 7+. Mixpanel do as well. Fiksu put it at 90%. You get the picture. Multiple independent sources all say that the vast majority of people are using iOS 7+ regardless of your personal gripes with it. Just because you don't like it and you know other people that don't like it, it doesn't mean Apple are "simply wrong" when they say that almost everybody is using iOS 7+.

      --
      Bogtha Bogtha Bogtha
    10. Re:Does Swift work on older iOS versions? by angel'o'sphere · · Score: 1

      My source is the author of NovoCard.

      Mixpanel and Fisku have no means to figure who is running what version of iOS on what device ... so their numbers are irrelevant.

      The only company who could is Apple, but they only track sold devices versus downloads of new OS versions. My device has downloaded iOS 8 since weeks, no idea how to prevent it doing so, hence my 'data plan' got reduced to 64kBits 2 weeks ago, untill the billing period is over. Actually all my devices have downloaded it ... perhaps even more reason to hate it?!?

      Do I install it? Hell NO!

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    11. Re:Does Swift work on older iOS versions? by Bogtha · · Score: 1

      My source is the author of NovoCard.

      Yes, but where did he say this? I want to be sure you aren't misinterpreting him or that there isn't another factor involved.

      Mixpanel and Fisku have no means to figure who is running what version of iOS on what device

      Of course they do. Do you really think they are just making the numbers up?

      The only company who could is Apple, but they only track sold devices versus downloads of new OS versions.

      No, that's not how they track it. Where did you get that idea from?

      It seems to me you are denying the numbers based upon your feelings towards the update. It doesn't matter what you feel, the numbers are what they are. Almost everybody is using iOS 7+.

      --
      Bogtha Bogtha Bogtha
    12. Re:Does Swift work on older iOS versions? by angel'o'sphere · · Score: 1

      Yes, but where did he say this? I want to be sure you aren't misinterpreting him or that there isn't another factor involved.

      He wrote that in an eMail to me. But there might be other factors involved. I dig in my mails and ask again.

      Of course they do. Do you really think they are just making the numbers up?
      Yes, I guess the numbers are simply estimates. A marketing company has no real access to such data (except Apple publishes that, never checked it). They only can evaluate their own web server log and 'ask for other companies logs' and thus you only know about the browsers with which those sites are visited. (Assuming Safari on iOS sends the OS version in its client identification string)
      So, no. A random company has no idea what OSes people use who never have connected to one of their services.

      Almost everybody is using iOS 7+.
      As _almost everybody I know_ is not using iOS 7 or 8, I really doubt that :) But perhaps that is a european thing, to upgrade late or never unless something is broken.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    13. Re:Does Swift work on older iOS versions? by Bogtha · · Score: 1

      Just stop. You have no idea what you are talking about. You are just guessing incorrectly at how these companies collect their data and you think your personal anecdotes trump real statistics. You're ignoring the information right in front of you because you only see what you want to see.

      --
      Bogtha Bogtha Bogtha
    14. Re:Does Swift work on older iOS versions? by angel'o'sphere · · Score: 1

      I simply doubt that companies other than Apple have any means to collect reliable data at all.

      Otherwise we had not that company releasing every year a statistics claiming that Microsofts web server (IIS) where the most widely used one, ah well second most widely used :)

      However if you have ideas how they measure iOS versions share them, I'm full ear.

      There was mo information right in front of me, you gave me two links, I checked one and the 'usage distribution' of iOSes made no sense at all ... and there was no information how they gathered that statistic, hence I doubt it is reliable.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    15. Re:Does Swift work on older iOS versions? by __aaclcg7560 · · Score: 1

      The only devices that can't upgrade to it are the iPhone 3GS and below, the equivalent iPod touch, and the first generation iPad. There aren't many people using these devices any more.

      I recently saw an iOS app update that listed a bug fix for the first generation iPad. O_o

    16. Re:Does Swift work on older iOS versions? by michaelpearls · · Score: 1

      My wife's first generation iPad is still running strong. She's rapidly losing apps because they're requiring higher and higher versions of iOS, but she's remaining happy for now.

    17. Re:Does Swift work on older iOS versions? by Bogtha · · Score: 1

      I simply doubt that companies other than Apple have any means to collect reliable data at all.

      Yes, but your doubts are based on incorrect guesses you have made about collection methods and personal experience, both of which are worthless.

      Furthermore, the statistics coming out of these companies are roughly the same as the statistics published by Apple, and you don't believe them either! So basically, your attitude is "if I don't like the stats, they are wrong". Well sorry, but you not liking the stats is not a reason to disbelieve them.

      Otherwise we had not that company releasing every year a statistics claiming that Microsofts web server (IIS) where the most widely used one, ah well second most widely used :)

      Huh? None of the companies we are talking about publish statistics like those.

      However if you have ideas how they measure iOS versions share them, I'm full ear.

      No you aren't. If you were paying attention, you'd already know how they measure iOS versions. The information is right there waiting for you to read it, but you ignored it already in favour of your own incorrect guesswork.

      you gave me two links, I checked one and the 'usage distribution' of iOSes made no sense at all

      No, what you mean is that you didn't like the statistics. They make perfect sense.

      there was no information how they gathered that statistic

      All you are showing here is that you didn't bother looking. That information is available on their websites, in one case at the bottom of the page I linked to.

      I get that you don't like the fact that iOS adoption of new versions is high, but can you try to understand the difference between what you would like to be the case and what actually is the case?

      If three different companies all independently measuring iOS adoption all come up with roughly the same figures, the fact that you know people who haven't upgraded does not outweigh those statistics.

      Now, if you aren't willing to pay attention to reliable sources and think your personal experience is more relevant than statistics sourced from millions of people, don't bother responding, as it's impossible to have a sensible discussion with you.

      --
      Bogtha Bogtha Bogtha
    18. Re:Does Swift work on older iOS versions? by angel'o'sphere · · Score: 1

      If you are so certain both links show how they collect data it would have been much easier and more polite to point that out instead of ranting nonsense for two posts minimum now.

      As I said: I'm full ear ... but not for rants. For information and facts.

      Have a nice day ...

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    19. Re:Does Swift work on older iOS versions? by Bogtha · · Score: 1

      it would have been much easier and more polite to point that out instead of ranting nonsense for two posts minimum now

      Not reading the sources I provided is impolite. I haven't been "ranting nonsense", I've been pointing out how and why you are wrong.

      As I said: I'm full ear ... but not for rants. For information and facts.

      I linked to these. You didn't read them.

      --
      Bogtha Bogtha Bogtha
    20. Re:Does Swift work on older iOS versions? by angel'o'sphere · · Score: 1

      I have read the first link you gave, not the second.

      And I simply did not see any link, headline or what ever leading to a description how they found their data.

      You pointed out, after a few more posts: there is one.

      Sorry, what is so hard in understanding that people easy oversee such links? Why are you so damn hostile? Never learned about a civilized way to do a discussion?

      I linked to these. You didn't read them.
      You are wrong, I read the first one ... not finding any substance in it, I did not bother to read the second one.

      And, to be honest, after you claimed "both" would nevertheless disclose their way how they gather the data, I did not check that so far ... so: no idea if they do. First time I read the first link, I saw _nothing_ about their data collection method.

      But thanks for wasting my time with you ...

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    21. Re:Does Swift work on older iOS versions? by master_kaos · · Score: 1

      Oh yes I have been dealing with it, and it sucks, especially since we get 15% of the downloads compared to iOS. We dropped all applications from android except our flagship, and even then it is a couple versions behind our ios app, missing a ton of features.
      Still develop for 2.1 and don't use any features that are newer than that

  17. They are wrong... by dnebin · · Score: 2

    Don't listen to these ass clowns saying "Go with Obj-C". If they had any clue they would know that introducing Swift was the first step towards obsoleting Obj-C.

    Assuming you're not learning this language to obsolete yourself, then you definitely want to stick with Swift.

    1. Re:They are wrong... by Anonymous Coward · · Score: 0

      If you know C, Objective-C is easy. Swift is easy-ish. Learning UIKit, CoreGraphics, etc. is the hard part.

    2. Re:They are wrong... by dgatwood · · Score: 4, Informative

      Don't listen to these ass clowns saying "Go with Obj-C". If they had any clue they would know that introducing Swift was the first step towards obsoleting Obj-C.

      Here's why you should learn Objective-C first:

      • There are billions of lines of production Objective-C code out there, and remarkably close to zero lines of production Swift code out there. If Swift is the first step towards obsoleting Objective-C, then the second step must be waiting fifty years for all the Objective-C code out there to get rewritten.
      • Swift isn't finished. From what I've read, they expect to make syntax-incompatible changes. Although they plan to have translators to move old code forward, do you really trust automated translators enough to run them on huge chunks of production code?
      • There's no assurance that Swift has staying power. Over the years, Apple has released bridges to many different programming languages over the years. Java? Check. Perl? Check. Ruby? Check. Python? Check. Now ask yourself how many of those bridges are still supported by Apple. If you only have time to learn one language, it should be the one that you know will still be popular in ten years.
      • Swift is designed to make it easy to build apps that include a mix of Swift, C, and Objective-C. Therefore, there's no reason to believe that it won't be possible to write fully capable apps for iOS and OS X in Objective-C for the foreseeable future. And even if, God forbid, Apple decides to be a bunch of a**holes and starts shipping a bunch of Swift-only classes in a reckless and desperate attempt to pressure developers to switch to Swift, you'll still only be a tiny bit of glue code away.

      That's not to say that Swift isn't interesting. The ability to test code on the fly is certainly cool, and if Swift proves to be a long-term-viable language, I'd imagine it will eventually (over a couple of decades) become the dominant language for OS X and iOS development. However, there's plenty of time to learn Swift. If you want to start writing real-world code today, you're better off learning Objective-C, because there are orders of magnitude more examples, you'll be more likely to find employment (there's way more Objective-C code out there to maintain), and more people can help when you run into problems.

      Ask again in five years, and the answer might be different, but for now, IMO, Objective-C is the clear choice unless you don't already know any C-based language, and probably even then.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    3. Re:They are wrong... by dnebin · · Score: 1

      Here's why you shouldn't learn Obj-C first:

      While you're busy learning obj-C, the rest of the ios developers will be learning Swift. In 5 years, by the time Apple has retired Obj-C, you'll be left with another out of date skillset. In 5 years companies will be looking for Swift developers, and you won't be ready, and you will once again find yourself behind everyone else.

      Heck, maybe that's why these fools are telling you to learn Obj-C; they're looking to reduce competition on the Swift jobs that they're already working towards.

      Instead, like I said, don't listen to these folks that don't know what they're talking about. You want to position yourself ahead of the curve, mastering Swift now while they're falling behind the 8 ball with their old obj-C skills. By the time you feel comfortable with Swift, you will be well ahead of the curve and companies will be wanting you on their team, not these obj-C folks.

    4. Re:They are wrong... by Anonymous Coward · · Score: 0

      > do you really trust automated translators enough to run them on huge chunks of production code?

      As someone that lived throught the NeXTstep 2 to NeXTstep 3 transition (Introduction of NSObject + NSString + autorelease, etc), I had to. And it worked very very well. Which astonished me to no end.

    5. Re: They are wrong... by Karlt1 · · Score: 1

      do you really trust automated translators enough to run them on huge chunks of production code?

      Sure, I use these things call compilers all of the time.....

    6. Re:They are wrong... by Anonymous Coward · · Score: 0

      That's right, and if Swift still fails, you can always fall back to Dylan again.

    7. Re: They are wrong... by dgatwood · · Score: 1

      Now take that compiled code and turn it back into Objective-C.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    8. Re:They are wrong... by 3dr · · Score: 1

      Although they plan to have translators to move old code forward, do you really trust automated translators enough to run them on huge chunks of production code?

      Yes, certainly. It's called running the automated translator and NOT blindly checking in the generated code. There's no concern here.

    9. Re:They are wrong... by dgatwood · · Score: 1

      While you're busy learning obj-C, the rest of the ios developers will be learning Swift. In 5 years, by the time Apple has retired Obj-C, you'll be left with another out of date skillset. In 5 years companies will be looking for Swift developers, and you won't be ready, and you will once again find yourself behind everyone else.

      It's a new language, not a new platform. It uses the same frameworks as Objective-C. So the five years you spent learning iOS development in Objective-C simultaneously taught you iOS development in Swift, aside from some syntactic sugar. If it takes you five years to learn the language itself, you should seriously consider a different career and leave programming to people who don't get hopelessly distracted by syntax.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    10. Re:They are wrong... by dnebin · · Score: 1

      Yep, just like programming Windows in C is so very similar to programming windows in C++, PowerBuilder, Java, Assembly, ... (it's just different languages, but it is on the same platform).

  18. Manual Reference Hasn't Been for Years by Anonymous Coward · · Score: 0

    Apple replaced it with ARC which relies on the compiler to manage memory.

  19. Avoid Objective-C! by Anonymous Coward · · Score: 0

    You must avoid Objective-C at all costs. It's a bizarre Frankenstein language that will destroy your sanity. I have no idea if Swift is any good, but it can't possibly be worse than Objective-C.

  20. Neither. by Anonymous Coward · · Score: 0

    I would rather people not bother with either ObjC or Swift unless they absolutely must. I hope Apple will finally take Mobile Safari more seriously so they stop falling behind so laughably. At this rate even Internet Explorer will leapfrog them soon, and with all the new WebAPIs coming out to manage hardware, speed up JS and make it memory-efficient, and transpile your language of choice into JS, there will be less and less of a reason to care about Apple's more proprietary languages and OS features. Unless of course they try to hold everyone back to stay relevant.

  21. Objective-C, hands down by tyme · · Score: 5, Informative

    Swift is still a very immature language, with lots of bugs in the compiler, rough support in the debugger and IDE, and the syntax isn't even set in stone yet (don't expect the syntax to settle down before Swift 2.0, probably some time in late 2015 if not 2016). There are a number of things that you still can't do in Swift (e.g. providing a callback function for APIs that expect a C function pointer), and you'll just spend a lot more time hitting your head against walls than writing working code. On top of this there are many more resources available for learning Objective-C than there are for Swift, and the pitfalls and corner cases are better understood for Objective-C than they are for Swift. As a bonus most of your instincts honed on C will carry over to Objective-C (while they are likely to lead you astray in Swift).

    Swift is a really exciting language, and fun to play around with, but it's not ready for production work (yet). It will get there, but in the mean time you should stick with the established tools, which means Objective-C for iOS and Mac OS X app development.

    --
    just a ghost in the machine.
  22. Right now, Obj-C by GrahamCox · · Score: 5, Informative

    A lot of comments here saying how Obj-C is "ugly", and so forth. I wonder how many commenters are actually using it to any great extent, on a day-to-day basis, rather than have just looked at it out of curiosity for five minutes?

    If you want to write an app now, Obj-C is the only sensible choice. Swift looks promising, but it's not ready. It's changing almost weekly and at the moment it's actually introducing bugs into the frameworks where none exist in Obj-C. If you want to live on the bleeding edge, go for Swift, but if you want to write an app, get it working and ship it out of the door, Obj-C is the only game in town today.

    Once you get into Obj-C, it's a much more elegant language than it's usually given credit for anyway. Sure, it's old, but the runtime and compiler work put in in recent years makes up for many of its older roots. Manual memory management is not required, there is a dot syntax for properties and so on, so square brackets are not the only way to call getter/setter methods. As a pure superset of C99, it's easy for a C programmer to learn. It's also a small language. The real power lies in the frameworks, and that will take you far longer to learn than the language. Don't be put off by the superficial "ugliness" of Obj-C code, it isn't relevant. It's expressive and straightforward, and as a former C++ programmer, I also found it dramatically more productive when I first adopted it over a decade ago. It is possible to become fond of it, believe it or not. Whether the same eventually becomes true of Swift, only time will tell. Ignore the nay-sayers who have probably never actually used Obj-C in anger in their lives.

    1. Re:Right now, Obj-C by jittles · · Score: 1

      A lot of comments here saying how Obj-C is "ugly", and so forth. I wonder how many commenters are actually using it to any great extent, on a day-to-day basis, rather than have just looked at it out of curiosity for five minutes?

      I write in Obj-C every work day and I do think its ugly. The function syntax with crazy long names gets tiresome. If there were no tab complete, Obj-C would be one of the most time consuming languages to write in. I also wish that I could have things like pure virtual functions instead of or in addition to protocols. I also wish that I could make properties protected instead of either public or private. It's not the ugliest language, but it's not my favorite.

  23. HTML5? by bios10h · · Score: 1

    I want all devices to end up running HTML5 apps or some kind of compatible format. I'm working on a mobile game using CocoonJS. Phonegap is also pretty good, especially now that modern HTML5 canvas are rendering using webgl.

    1. Re:HTML5? by rasmusbr · · Score: 0

      I want all devices to end up running HTML5 apps or some kind of compatible format. I'm working on a mobile game using CocoonJS. Phonegap is also pretty good, especially now that modern HTML5 canvas are rendering using webgl.

      If one prefers to use HTML, CSS and JavaScript to write applications there is this thing called a "web browser" that can parse HTML and CSS and run JavaScript, as well as access various local resources on the device.

      It often works reasonably well on phones and tablets too!

  24. Why are you in charge of the decision? by BarbaraHudson · · Score: 4, Insightful

    Although I am well-versed in C, I have thus-far avoided C++, C# and Java, and have only briefly dabbled in Obj-C. Now that there are two possibilities for doing iOS Development, which would you suggest that I learn, at least at first? And is Swift even far-enough along to use as the basis for an entire app's development? My goal is the fastest and easiest way to market for this project; not to start a career as a mobile developer.

    This portends badly. You don't know enough about any of the languages currently in use on any platform, and your goal is "the fastest and easiest way to market?" The obvious solution is to give the job to someone else who knows what they're doing.

    So, since that's not what's happening here (and any sane - and most insane - business would go that route), this is a case of "I've got a cool idea for a mobile app but I don't know anything about the platforms or how to code in the languages behind them, and I don't want to give any details about what its' performance and resource requirements are because someone might steal the idea." This is further borne out here:

    If/when I decide to port my iOS App to Android (and/or Windows Phone), would either of the above be an easier port; or are, for example, Dalvick and the Android APIs different enough from Swift/Obj-C and CocoaTouch that any 'port' is essentially a re-write?

    Why not just download the dev kits for Android and iOS and ask yourself if you can even understand the development documentation, the APIs, etc? The problem right now is yo don't even know enough to ask the right questions: you don't want to commit to something (objc vs swift) this early in your learning curve and then find out you made the wrong choice because you didn't take a month to pick up some basics.

    --
    "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    1. Re:Why are you in charge of the decision? by macs4all · · Score: 0, Troll

      OP here.

      You are correct, at least partially, Barbara. This IS more of a case of "I have a cool idea..." But I thought I made that clear.

      And there is neither the budget nor time to do what you, and others, have suggested; contract it out, as sensible a suggestion as that may be.

      But, not every useful App needs a top-notch Developer; and I have been a Developer (and quite often the only one) on enough Projects, for enough disciplines, for enough decades, that I can tell you with confidence that in any reasonable Language, this is a medium-low-complexity Project. The people that have said that I will spend more time mastering the necessary Frameworks than learning whichever Language, are exactly singing to me...

      I do, of course, intend to start learning the IDE and APIs (at least for iOS) before I seriously commit to a programming Language; but I just thought I could take advantage of the Collective Intelligence of the Slashdot Community, mainly to see if there was a clear consensus as to whether, at this point in time, there was a clear "winner".

      I am intensely grateful that the vast majority of the Posters Responded with thoughtful and non-condescending advice. Too bad you were too busy with your arrogant belittlement and holier-than-thou self-aggrandizement to offer anything worthwhile.

      Thanks...

    2. Re:Why are you in charge of the decision? by mariox19 · · Score: 0

      Although I am well-versed in C, I have thus-far avoided C++, C# and Java [...]

      It's amazing to think there is someone like this in 2014. It's like those stories they used to tell of Japanese soldiers stranded on Pacific Islands, back in the '50s and '60s, who allegedly had no idea WWII had ended. In all honesty, I find it almost easier to believe in the stories about the Japanese soldiers.

      --

      quiquid id est, timeo puellas et oscula dantes.

    3. Re:Why are you in charge of the decision? by macs4all · · Score: 1

      Although I am well-versed in C, I have thus-far avoided C++, C# and Java [...]

      It's amazing to think there is someone like this in 2014. It's like those stories they used to tell of Japanese soldiers stranded on Pacific Islands, back in the '50s and '60s, who allegedly had no idea WWII had ended. In all honesty, I find it almost easier to believe in the stories about the Japanese soldiers.

      Not in the real-time measurement and control world, where the vast amount of my experience lies.

      Until very recently (and really only since the advent of the iPhone), Microcontrollers simply didn't have the resources to stand the cycle-stealing overhead of languages like C++; so, the vast majority of devs. that were having to write stuff that had to keep up with the real-world (or else Bad Things would actually happen; not just a Sprite-Draw would be a little late) write in either Assembly and/or C, and most still do.

      I still get a chuckle when job requirements for real-time Projects insist on C++. It's usually a sure sign that the requirements were written by HR from a series of Buzzwords; or by a clueless PHB.

      As I said, just like the Porn industry drives multimedia capabilities, the smartphone/tablet industry is creating SoCs (can't even call them MCUs anymore!) that, while they are incredibly powerful, are still out of reach, budget and size-wise, for the vast majority of embedded designs.

      So, it is you that is an anachronism; because the world you think we live in, and its obligatory Flying Cars, sadly won't exist for another decade, at least. And until then, you are better served as an Embedded Dev. to know C and Assembler, than to know C++, Java, or, quite frankly, any other Object-Oriented Language.

    4. Re:Why are you in charge of the decision? by BarbaraHudson · · Score: 1

      First, nowhere did you state that this was a personal project. If you had been up-front and written "I have a cool idea for a personal project..."

      Given the context (your first line):

      I am an experienced C and Assembler Embedded Developer who is contemplating for the first time beginning an iOS App Project.

      ... it's not clear whether you are putting this forward as something your employer wants, and you're thinking of throwing your hat in the ring, or a personal project.

      Your questions make it VERY clear that you haven't even done the basic research, and your assumption that decades of experience doing asm and c (w/o any real experience in oop, objc, java, or whatever), this is not going to be an issue:

      that I can tell you with confidence that in any reasonable Language, this is a medium-low-complexity Project

      Sure, language has almost NOTHING to do with implementation. And yet, if you don't even know the language, how are you going to grok the APIs? To borrow your characterization, "your arrogant belittlement and holier-than-thou self-aggrandizement" that the language itself is something you'll pick up off-the-cuff because you are "an experienced C and Assembler Embedded Developer" - for objc, we're not talking about a scripting language here. Like asm and c, you have enough power to seriously shoot yourself in the foot. And thinking in terms of objects instead of procedural code means throwing away a lot of asm/c design and implementation habits.

      When I wrote:

      Why not just download the dev kits for Android [android.com] and iOS [apple.com] and ask yourself if you can even understand the development documentation, the APIs, etc? The problem right now is you don't even know enough to ask the right questions: you don't want to commit to something (objc vs swift) this early in your learning curve and then find out you made the wrong choice because you didn't take a month to pick up some basics.

      ... and you reply ...

      I do, of course, intend to start learning the IDE and APIs (at least for iOS) before I seriously commit to a programming Language

      I notice you ignore the dev documentation - the stuff that gives you the overview, tutorials, the other stuff (not just the APIs), which you need NOW, to help you make an informed decision, because YOU are going to be stuck with whatever you decide. Thinking you can rely on "the Collective Intelligence of the Slashdot Community" to make the basic decisions for you? Have you not seen any of the holy wars - vi vs emacs, linux vs windows, kde vs gnome, gpl license vs mpl vs bsd vs public domain, the distro wars? Even the language wars in some of the respondents to your question.

      "The will to prepare to succeed is more important than the will to succeed." I've worked in asm and c, and I would never be so arrogant as to suggest that either one of them would give me the mindset I needed for working in oop. Anyway, good luck with your project. You can use the links I posted to download everything you need, rather than taking mine (or anyone else's) opinions for more than what they are - opinions. Learning something new is always exciting :-)

      And btw, I notice that, with 99 comments in, nobody else has bothered to actually provide you with the links to the official Apple iOS developers or Android developers docs, api, tools, etc. I at least showed enough respect for you to expect you to benefit from them. Was I wrong? Only time will tell.

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    5. Re:Why are you in charge of the decision? by putaro · · Score: 1

      And btw, I notice that, with 99 comments in, nobody else has bothered to actually provide you with the links to the official Apple iOS developers or Android developers docs, api, tools, etc. I at least showed enough respect for you to expect you to benefit from them. Was I wrong? Only time will tell.

      You know, if he can't use Google he's really bad off.

      Back in 1990 if you were an experienced C developer and hadn't looked seriously at OO languages it was understandable. In 2014, if you haven't at least dabbled with C++, Java or C# I think it shows a definite unwillingness to learn. So that's why the OP is getting "condescending" answers like "just hire someone"

    6. Re:Why are you in charge of the decision? by Anonymous Coward · · Score: 0

      Tip: Before you start programming your super awesome iOS project, you should consult a style guide and review when words should be capitalized.

    7. Re:Why are you in charge of the decision? by macs4all · · Score: 1

      Tip: Before you start programming your super awesome iOS project, you should consult a style guide and review when words should be capitalized.

      I capitalize to denote proper nouns, and sometimes just for emphasis.

      So, how is that helpful for deciding which language I should use?

      IOW, bite me.

  25. If you 'speak' C by MacOSXHead · · Score: 1

    Have you written ANY code for iOS or OS X? How old are LLVM based compilers? How old are the US Tools available in Xcode 6?

    I do not understand how your post was marked as insightful. If you want to write an iOS app you must use swift or Objective-C?

  26. Swift and Objective-C both have their place... by MacOSXHead · · Score: 1

    It is very good that you are coming from a C and assembly background. Its always important to understand what any compilers or interpreted language do behind the scenes. My experience was Pascal => assembly => Basic => ObjectPascal => C => C++ => Java => Objective C => Python => Ruby => Perl; a lot of them overlapping.

    The first thing I would suggest is to get up to speed on object-oriented programming concepts.

    I would say that you should be familiar C++, Objective-C, Objective-C++ (can come in very hand when using c++ and Objective-C in the same project).

    Swift seems to be the future for iOS and OS X and looks to be a very interesting language with some really great Xcode tools behind it. Think Playgrounds.

    Its always good to know JVM based languages Java, Scala, etc... Obviously if you are going to do any Android you will have to know Java.

    My prediction: Swift will be the most important language for iOS, OS X five years from now. It is usable today. Keep in mind that Swift is a language that is quickly evolving based on developer input, so there is going to be some overhead in keeping up with the changes.

    Xcode is free, but it is worth the 99.00 dev program just to watch the last few years WWDC videos. Its pretty wild what you can do with Xcode these days.

    Good luck with your iOS adventure. It can be a lot of fun!

    1. Re:Swift and Objective-C both have their place... by Anonymous Coward · · Score: 0

      >

      Xcode is free, but it is worth the 99.00 dev program just to watch the last few years WWDC videos. Its pretty wild what you can do with Xcode these days.

      Good luck with your iOS adventure. It can be a lot of fun!

      You can download Xcode without registering and you can register as a developer for free. Once registered as a developer you can watch all the WWDC videos for free (some in iTunes, some on Apples site ready to download).

      You only need to pay $99 if you want to install your own apps on your phone or publish to the App Store.

  27. God dammit just use ASM if you must by Anonymous Coward · · Score: 0

    Assembler is the tool. Assembly is the language. You could admit you are the pretender, with hopes and dreams of one day knowing what it is you ... pretend to know - Pretender.

    1. Re:God dammit just use ASM if you must by macs4all · · Score: 1

      Assembler is the tool. Assembly is the language. You could admit you are the pretender, with hopes and dreams of one day knowing what it is you ... pretend to know - Pretender.

      No Poser I.

      Not to brag, but I have been an Embedded Dev. For over three decades. I have written tens and tens of thousands of lines of Assembly Language for everything from 8 bit 6502 to 32 bit ARM9 Cortex, and everything in between. Various MCUs and CPUs from Microchip, Mot., Zilog, Intel, ST, Atmel, to name but a few. I have personally rewritten 6502 assemblers to cross-assemble for 6809 and 8051. I am experienced in many, many different IDEs, debuggers, ICEs, etc. My specialty is real-time measurement and control systems, with or without RTOSes.

      But sometimes, just like the many Nuclear Physicists that still occasionally slip-up and say "Nuke-U-Ler", I occasionally flip the terms "Assembler" and "Assembly".

      So, Mr. terminology-Nazi: You are hereby cordially invited to Bite Me.

    2. Re:God dammit just use ASM if you must by Anonymous Coward · · Score: 0

      x86 assembly FTW..."Soul-Are"...

    3. Re:God dammit just use ASM if you must by BarbaraHudson · · Score: 1

      I think the reason that people are going a bit nit-picky (heck, I still call it assembler because, lets face it, it's always a specific target, and a specific assembler with its own syntax) is because of the implied assumptions in your original question. As someone who is comfortable with assembler, c, c++, java, the p languages, etc., I could see how silly the reverse question would be: "I have decades of c++ experience, and now I want to write a program in asm or c. Which is the better choice?" Someone who has both c and c++ experience would say "Are you ready to work without destructors? Without all those standard class libraries?" Thinking exclusively in terms of procedures, and not classes?

      Someone who would pose the even worse question: "I have decades of java experience, and now I want to write a program in asm or c. Which is the better choice?" would get treated worse."Are you ready to deal with the macro processor and all those clever #defines that tend to obfuscate the code if you're not a c/c++ programmer?"

      And of course, neither really prepares them for using assembler/assembly, unless they've already been writing embedded assembler in their existing code.

      Learning the language is easy, compared to using it well. "A good idea, poorly executed, is worse than a bad idea, well executed." Marketing (which is part of execution) makes plenty of bad ideas look good, and gives time to come out with an improved version that is less bad.

      So part of the problem is that your question is just an unfortunate twist to one we've heard too many times: "I have a great idea and now all I need to do is code it? How do I do that?" It's like the people in decades past who said "I have a great idea. If you code it, I'll give you 10%." I came very close to losing one friend over my refusal. He felt I was depriving him and his family of a chance to get rich quick.

      As for my original advice, I would add this: You don't need to learn an IDE to do Android development. A shell, a few makefiles and scripts, and a cheap Android device (just buy a $100 android tablet) and the sdk and a usb cable. The android device can easily be put into developer mode with just a few taps on-screen. This would probably be more familiar for, and similar to, your current workflow. And once you learn the ins and outs of eclipse ...

      Either way, don't be discouraged, and try not to take any criticism personally - a mis-step here or there is no big deal in the long run.

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
  28. herp-derp I like what I know by Anonymous Coward · · Score: 0

    mod this redundant.

  29. Dalvick? by Anonymous Coward · · Score: 0

    FYI, Dalvik (no "c") and its successor, ART (Android RunTime) are a version of Java, so no matter what you do, you'll have to rewrite for Java.
    There is the option of writing "native" code, but you'll need to compile for ARM, MIPS, and Intel if you want the widest compatibility for your apps.

    1. Re:Dalvick? by macs4all · · Score: 1

      FYI, Dalvik (no "c") and its successor, ART (Android RunTime) are a version of Java, so no matter what you do, you'll have to rewrite for Java. There is the option of writing "native" code, but you'll need to compile for ARM, MIPS, and Intel if you want the widest compatibility for your apps.

      Hey, my article submission said "Dalvik". Slashdot editors put in the unwanted "c".

  30. Right now, Obj-C by Anonymous Coward · · Score: 0

    Same thing with Java haters,.. and C++ haters. I wonder how many years they've spent programming in it.

  31. Stay away from Objective-C by brit74 · · Score: 1, Interesting

    My current company did most of their work in Objective-C. It's a bear. One of the worst parts is all the retain and release calls. They're used for memory management, and god help you if you forget because there's no obvious way to see the problem. Our current company is ditching Objective-C entirely and moving to QT and C++. My boss, who wrote all the Objective-C stuff, says that Objective-C has become a mess over the past 5-10 years as Apple is promoting Objective-C for both iOS (iPhone, iPad) and OSX (desktop) applications, which has caused all kinds of problems and bloat. I've had all kinds of problems with Objective-C, so I don't doubt his characterization of it.

    1. Re: Stay away from Objective-C by Anonymous Coward · · Score: 0

      Try and Google ARC. Been around for a while.

    2. Re:Stay away from Objective-C by Anonymous Coward · · Score: 2, Insightful

      You could try using ARC (Automatic Reference Counting) and the retain-release difficulties [are suposed to] disappear. The code to interface to the low level code is added (transparently) by the compiler when ARC is enabled.

    3. Re:Stay away from Objective-C by Bogtha · · Score: 2

      One of the worst parts is all the retain and release calls.

      OP says he's familiar with C, so he's already used to manual memory management.

      Regardless, modern Objective-C uses ARC, which means all the retain and release calls are automatically generated by the compiler. You actually get a compiler error if you try to write the calls yourself these days.

      god help you if you forget because there's no obvious way to see the problem.

      Aside from the fact that Apple provides excellent tools like Instruments and a static analyser which lets you track down problems like this easily, so long as you understand one single principle, it's very difficult to go wrong with manual memory management on Apple platforms.

      NARC. If a method begins with new, alloc, retain, or copy, then you own it and it's your responsibility to release it. Otherwise, you don't need to.

      The only people who struggle with memory management are the ones that don't understand this very simple rule. Learn that, and it's effortless.

      My boss, who wrote all the Objective-C stuff, says that Objective-C has become a mess over the past 5-10 years as Apple is promoting Objective-C for both iOS (iPhone, iPad) and OSX (desktop) applications, which has caused all kinds of problems and bloat. I've had all kinds of problems with Objective-C, so I don't doubt his characterization of it.

      To be frank, it sounds like none of you have more than a beginner understanding of the language. How can you not be aware of NARC or ARC? It's the kind of thing you learn on day one.

      --
      Bogtha Bogtha Bogtha
    4. Re:Stay away from Objective-C by Anonymous Coward · · Score: 0

      I've haven't written line one of Objective-C and I knew about ARC. It's probably the most appealing thing about Objective-C for me. It seems like a great compromise between the traditionally awful memory management one suffers in C/C++ and the high and unpredictable overhead of GC.

    5. Re:Stay away from Objective-C by GrahamCox · · Score: 1

      You don't need to use "all the retain and release calls". In fact, by default, they are not enabled. They're only required in legacy code, or if you really prefer to work that way (and believe it or not some do - it's actually not really very hard if you take the trouble to understand it properly - most people who get into trouble with manual retain/release/autorelease often haven't spent the half hour reading the relevant documentation, or the even-better explanation found in 3rd party books, e.g. Hillegasse).

      If you do get into trouble, and we've all done it, no denying that, there are plenty of "obvious" ways to see the problem - such as the Instruments 'Leaks' tool or NSZombie. If you haven't come across these you should be shamed of yourself as an iOS developer.

      And so, having missed all the advantages of Obj-C due to misunderstanding memory management, wilful ignorance or straightforward incompetence, you're moving to C++. The irony is, you have no mechanism for tracking memory allocations over time there, and you have to do everything yourself - there is nothing in the C++ runtime to help you. Some programmers do prefer writing their own solutions to perennial problems, because they can't understand others' solutions to those same problems. It sounds a little like what you're saying here - your company's programmers don't really 'get' Obj-C's memory management rules, find them "a bear" and so are moving to C++ where they'll get no help on that score at all, but hey, at least they can reinvent their own wheel and so understand how it works, square corners and all.

  32. C/C++ for core, Obj-C for UI by perpenso · · Score: 2

    Write the core of your application in C/C++, or asm if you like :-), however use objective-c for platform specific calls on iOS. Objective-C is the native language of the Cocoa API. Don't fight the platform. Use whatever is the native language for the platform, objective-c for iOS, java for Android, etc.

    Keep the core C code separate from the platform specific code. Write the core code as if it will be a library, define an interface to its functionality. Have the platform specific code, like your UI code, use this interface. Depending on the language you do the platform specific stuff in you may in fact need to put this core code in a library.

    Objective C is more convenient than Swift since it integrates much more easily with C code. Mix objective-c files and C/C++ files in your project and they all just compile down to native code into a single binary. You don't need a library, although a library is a nice way to organize things.

    Now that you have the core code in this nice portable "library" you can move it to Android or whatever platform you might be interested in.

    For UI code I tend to just do a native implementation on each platform, use platform specific technologies, etc. Basically give the user the look and functionality they expect. To fail to do so may result in poorer reviews.

    Swift is interesting, but personally its a little too new for my tastes. I don't want to be an early adopter of a development language. Objective-c is the native API for Cocoa, I'll stick with that until the bugs/quirks of Swift are worked out and examples of how to do things are plentiful like they are in objective-c.

    1. Re:C/C++ for core, Obj-C for UI by macs4all · · Score: 0

      Thanks. I think that is the most cogent advice yet.

  33. neither by Anonymous Coward · · Score: 0

    neither language will lend itself well to writing portable software. Write only what UI parts you have to in apple's proprietrary languages, and implement the remainder in something portable like C++. This will lead to better structured code anyway. I don't see any reason for any competent devloper to write non-portable softwarenin the modern world. Lack of portability is the hallmark of developer incompetence.

  34. arcane programming by Anonymous Coward · · Score: 0

    try creating a game engine from scratch with artifical intelligence, etc, actually try and require to use your mathematical abilities, rather than learning arcane rules, "gotchas" or technicalities of some 'new trend' language

    once you do that, come back to mobile development after programming that requires instense mathematical abilitity, is like going from running with 20lb weights attached to each boot to walking with running shoes on.

    seriously, what are you trying to do, create some crappy app that no one will probably use, or actually increase your programming ability?

    Also to the guy who said that, those who say that 'x' language is crap are wrong, is wrong. the truth is every language is crap, the sooner you realize this the better off.

  35. Learning Resources by neoshroom · · Score: 1

    I would stick to Objective-C for the moment as there are more learning resources online.

    I agree with this. As a new user, for the moment, Objective-C is likely the way to go due to their being more documentation out there. Swift documentation though is rapidly increasing.

    As a developer in both Swift and Objective-C, the primary advantage of Swift is it is slightly faster to do many things as it doesn't require strict classing of variables, so you find yourself not having to spend as many lines of code swapping strings to integers as that kind of thing and end up with slightly more readable code.

    However, these advantages likely aren't as important for a new user as having a wealth of documentation to learn from.

    --
    Big apple, new Yorik, undig it, something's unrotting in Edenmark.
    1. Re:Learning Resources by dgatwood · · Score: 1

      Documentation is just the beginning. There's also also sample code, plus all the open source code out there, plus snippets on Stack Overflow, etc. It will take many years for Swift to catch up with all of that.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

  36. Dup by Anonymous Coward · · Score: 0

    Thanks for reminding me of the dup key.

  37. Very outdated info by SuperKendall · · Score: 1

    Swift isn't finished. From what I've read, they expect to make syntax-incompatible changes.

    That was before Swift 1.0 introduced with the final XCode 6 and iOS8. They aren't breaking syntax anymore...

    And even when they were, it was usually pretty minor things to fix.

    I'd imagine it will eventually (over a couple of decades)

    HA HA HA HA HA HA HA

    You don't know Apple, or iOS developers. Dominant over ObjC within two years (and by the end of next year that prediction will probably seem ridiculously conservative).

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:Very outdated info by putaro · · Score: 1

      HA HA HA HA HA HA HA

      You don't know Apple, or iOS developers. Dominant over ObjC within two years (and by the end of next year that prediction will probably seem ridiculously conservative).

      Oh really? Drink some more koolaid. Remember how long it took to lay Carbon to rest. And the Cocoa APIs are still incomplete in many areas. Then take a look back at all the new programming languages and frameworks Apple has introduced over the years and then shot in the head. Dylan? OpenDoc?

      I'd say it's 50/50 whether or not Swift will get enough traction to continue on.

    2. Re:Very outdated info by Bogtha · · Score: 1

      Remember how long it took to lay Carbon to rest.

      Very different situation. I work with a lot of companies that develop iOS applications, and it's extremely rare for them to be more than a couple of years behind the cutting edge.

      Then take a look back at all the new programming languages and frameworks Apple has introduced over the years and then shot in the head.

      Modern Apple does it very infrequently, and usually, when they do, it's because they've got something newer to replace it. In this case, Swift is the newer thing.

      --
      Bogtha Bogtha Bogtha
    3. Re:Very outdated info by Anonymous Coward · · Score: 0

      Do you have the slightest hint as to what a colossal douche you are?

      To be clear, this single comment doesn't make you a douche, but your comments collectively do.

    4. Re:Very outdated info by dgatwood · · Score: 1

      Remember how long it took to lay Carbon to rest.

      Very different situation. I work with a lot of companies that develop iOS applications, and it's extremely rare for them to be more than a couple of years behind the cutting edge.

      Staying close to the cutting edge is easy when it's an incremental change. It's a very different thing when it means throwing out all of your your code. With the Carbon transition, you had to throw out and rewrite all of your code. Transitioning Objective-C code to Swift would have the same implication, because the language syntax is different.

      Mind you, the effort in moving to Swift is lower, because the frameworks you're using are the same. On the other hand, the benefit is also lower, because the frameworks you're using are the same, and because the languages are designed to interact almost seamlessly, which largely eliminates any incentive to move existing code.

      I expect most developers (and by that, I mean anybody not doing it as a hobby) to keep all of their existing code in Objective-C, but add new code in Swift, assuming they decide to adopt it at all. I could be wrong, but I really, truly don't see anything about the new language that makes me want to start rewriting those billions of lines of existing code in a new language. If I were starting a new app from scratch... well, I just did, and I chose Objective-C, because I don't think Swift is ready yet. Maybe in two or three years, I might start writing new from-scratch apps in Swift.

      Modern Apple does it very infrequently, and usually, when they do, it's because they've got something newer to replace it. In this case, Swift is the newer thing.

      I disagree. IMO, it's telling that Apple has never given even the slightest hint that Objective-C will ever be anything less than a first-class language. Instead, Apple is positioning this not as a replacement for Objective-C, but as a replacement for the Ruby/Python/Perl bridges—as a first-class, truly Apple-supported scripting language—something that Apple has never had before.

      The only major uproot in Apple's history (no, the CPU architecture changes weren't major unless you were writing a lot of code in assembly language) was when they deprecated Carbon. The big difference here is that Carbon was always intended to be temporary. Initially, it wasn't even going to exist, but pressure from a few large developers convinced them to make a classic-Mac-compatible API available as a stopgap so that they could transition their code more gradually to OS X and Cocoa. Carbon was always going away from the day it first became available in OS X, yet even still, it took the better part of a decade before they released the first major feature (64-bit support) that was incompatible with Carbon. More to the point, Carbon code still works to this day, fourteen years later, and lots of apps still contain some vestigial Carbon code, albeit mostly non-UI code, much of which still works even in 64-bit apps.

      Given the glacial pace at which Apple removed an API that was always supposed to be temporary, tell me why in the world you think that Apple won't take even longer to replace a non-temporary language that Apple says isn't going away with a language that Apple says isn't replacing it!?!

      Finally, I'd add that for the moment, there's another very strong reason to not move to Swift: Preliminary third-party analysis of Swift shows that for many simple operations, it is more than an order of magnitude slower than Objective-C. Assuming their testing methodology does not prove to be invalid for some reason, I would consider Swift to be a good choice for the same sorts of hobby apps that you might write using the Objective-C–Ruby bridge. However, if you're thinking about writing a major app in Swift, you should probably think twice, at least for now. Presumably,

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    5. Re:Very outdated info by dgatwood · · Score: 1

      You don't know Apple, or iOS developers. Dominant over ObjC within two years ...

      From what I've read, Swift is not positioned as an Objective-C replacement. It's positioned more as a Ruby–Objective-C bridge replacement. It will be completely dominant over Ruby for OS X development purposes within two years. It will slowly gain traction among iOS developers, and some will use it for new code, but that doesn't mean it will be dominant by any means.

      The fact remains that there are billions of lines of Objective-C code out there. If you honestly think that developers are going to rewrite all those billions of lines of code in another programming language within two years, or write an equivalent amount of Swift code in that time, then you don't know developers. Yes, maybe the fart apps will be predominantly Swift in two years, but not the nontrivial apps. The longer a language has been around, the longer it will take for another language to take its place.

      In the best-case scenario for Swift, even if every developer stopped writing Objective-C code cold turkey today, assuming the lines of code written by iOS developers per year is mostly constant (I realize that isn't quite true, but it's nowhere near exponential growth), it should take close to seven years before iOS Swift code lines outnumber iOS Objective-C code lines. And it could take fourteen years to reach the balancing point for OS X. And that's the best-case scenario. The reality is, most developers will phase it in over a period of time, initially using it only for new projects (if that). So the real-world balancing points are even farther out.

      Now if Apple were to release an Objective-C to Swift translator, that would change the situation pretty significantly, for two reasons: first, because it would mean that Apple considers Swift to be enough better than Objective-C to make it worth porting your old code, and second, because it would make it possible to quickly replace Objective-C code with machine-translated Swift code. At that point, Swift might be the language to learn first, depending in large part on how developers react. But unless and until that happens, although it's a good idea to learn Swift, it shouldn't be the language you learn first unless you just enjoy suffering from a lack of adequate code snippets and sample code.

      ... and by the end of next year that prediction will probably seem ridiculously conservative ...

      My predictions are rarely conservative. If anything, they're usually not cynical enough to adequately model developer apathy and resistance to change....

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    6. Re:Very outdated info by SuperKendall · · Score: 1

      It will slowly gain traction among iOS developers, and some will use it for new code, but that doesn't mean it will be dominant by any means.

      I don't think you understand, for new projects it pretty much already is.

      The fact remains that there are billions of lines of Objective-C code out there. If you honestly think that developers are going to rewrite all those billions of lines of code

      Of course not but over time refactoring will rid you of much of that.

      I'm not saying all of that is going to be re-written, but within a year I don't think many projects will be started that do not use Swift at the outset.

      Now if Apple were to release an Objective-C to Swift translator,

      In effect they already do by automatically generating Swift versions of any header files you want Swift to see. That means it's zero cost to call into any existing code from Swift.

      If anything, they're usually not cynical enough to adequately model developer apathy and resistance to change..../em

      You REALLY do not understand the iOS development community. I would agree with you in any other context, I have been a developer in a lot of worlds, from backend to front end dev. In any other community of developers you would be right; for iOS development you are so, so wrong - primarily because iOS developers are used to constant change anyway, the language changing is just one more change. If it makes you even a little more productive people will use it - and Swift does that quite well.

      My predictions are also very, very conservative...

      --
      "There is more worth loving than we have strength to love." - Brian Jay Stanley
    7. Re:Very outdated info by dgatwood · · Score: 1

      ... iOS developers are used to constant change anyway ...

      I certainly haven't seen "constant change" in iOS development. In many releases, Apple has made changes to their UI that require some minor redesign so that your app doesn't look dated, but that's mostly just piddly UI changes, most of which required few or no code changes. The core of most apps doesn't get rewritten unless something doesn't work or the developer adds major features that necessitate replacing bits to overcome limitations in the original design.

      If an iOS developer is having to change his or her code constantly, that usually (but not always) indicates that he or she designed it wrong to begin with. And I think a big part of that is because so many inexperienced developers jumped on the iOS bandwagon early, hoping to make it big by writing apps for a hip new platform. The result was not only excessive amounts of rewriting, but also a proliferation of relatively simple apps that still manage to break with every new release somehow. I suppose it is possible that Swift will dominate the iOS landscape pretty quickly in terms of the number of apps, but only because such a high percentage of iOS apps have so little actual code behind them that you could rewrite them as a web app in a week or two.

      But when it comes to any apps that are reasonably complex, I don't see that happening, nor do I see Swift dominating in terms of lines of code for many, many years. In particular, I'd expect most cross-platform game developers to strongly resist moving to Swift because of performance, difficulty integrating with underlying shared C code, etc. For example, good luck writing an OpenGL app in Swift. The function pointer headaches will knock decades off your life.

      And that's assuming that developers decide that they care. There was a lot of interest as a result of the initial hype, but interest seems to have waned considerably since then. It's anybody's guess whether developers will actually decide to adopt it. Developers are a fickle bunch, particularly when it comes to programing languages, and iOS developers are no exception. For now, I think the sensible approach is to experiment with the language a bit and see if you like it. If you love it, adopt it. Otherwise, take a wait-and-see approach—wait and see if Apple fixes the initial performance and C compatibility limitations, wait and see if developers adopt it in significant numbers, and wait and see if Apple starts pushing people to adopt it in lieu of Objective-C.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    8. Re:Very outdated info by Bogtha · · Score: 1

      Staying close to the cutting edge is easy when it's an incremental change. It's a very different thing when it means throwing out all of your your code.

      Adopting Swift doesn't mean throwing out all of your code. You can have Swift classes in a mostly Objective-C codebase and Objective-C classes in a mostly Swift codebase as you wish.

      I could be wrong, but I really, truly don't see anything about the new language that makes me want to start rewriting those billions of lines of existing code in a new language.

      Who is talking about doing that? The conversation is about Swift being the dominant language for iOS development. If most new code is written in Swift, then it's dominant regardless of the fact that there's lots of legacy Objective-C code out there.

      Apple is positioning this not as a replacement for Objective-C, but as a replacement for the Ruby/Python/Perl bridges

      That's not even close to accurate. Read the Apple material, watch the WWDC videos, talk to the Apple engineers. This is not a replacement for a scripting bridge, it's intended to be the first choice for typical developers.

      tell me why in the world you think that Apple won't take even longer to replace a non-temporary language

      Once more, the conversation is about whether or not Swift will be the dominant language, not whether it will be the only supported language. Nobody is arguing that Apple are going to remove Objective-C support tomorrow.

      Preliminary third-party analysis of Swift shows that for many simple operations, it is more than an order of magnitude slower than Objective-C. Assuming their testing methodology does not prove to be invalid for some reason

      It already has for the most part, where have you been? Most of the benchmarks out there were run with beta tools, had different compiler switches, or other beginner level mistakes. Yes, there are some areas where Swift is slower, but most application developers aren't going to be significantly affected by that. Letting vague aspersions about performance dictate your language choice is nuts. Most of the time it doesn't matter and when it does, which language is faster depends on the exact thing you are doing.

      if you're thinking about writing a major app in Swift, you should probably think twice

      This is just FUD. Most languages are fast enough for typical use cases, and if you think you are going to be in the minority affected by performance issues, you really should consider Swift rather than dismiss it because depending on your use case, it could be faster for your situation.

      start with Objective-C. That will let you get started working with real-world code now

      Ah yes, my running streak of conversations involving the phrase "real-world" meaning "things I don't irrationally dislike" remains unbroken.

      There is absolutely nothing that is not "real-world" about Swift.

      The vast majority of what you learnâ"the frameworks themselvesâ"won't change if you later decide to switch to Swift. Only the syntax changes.

      If you think that the only difference between Objective-C and Swift is syntax, then you really haven't given Swift more than a passing glance. It's a very different language.

      --
      Bogtha Bogtha Bogtha
  38. The Case For Swift by SuperKendall · · Score: 1

    There's a very strong case to be made for Swift first going forward, and not many seem to be making it or understand the iOS dev world at all.

    I speak as someone who has been developing iOS applications since somewhat before the release of the iOS SDK way back when.

    I don't think anyone outside those paying the closest attention to iOS development realize how rapidly Swift is being adopted, especially by those who have been doing Objective-C the longest.

    That's the core aspect of this I don't think people understand. iOS developers by and large are a very pragmatic bunch. Even those who love Objective-C (and there are many) are perfectly happy to move to something new that makes development even faster so they can accomplish the end goal of building apps for people.

    That's really what iOS developers really care about, delivering apps. Anything that helps they are on-board with, and you can plainly see Apple is backing Swift big-time so the developers are hitching to that very powerful wagon.

    If I were advising ANY developer new to iOS, I would absolutely say go Swift first. Someone said there's more Objective-C educational material? Technically true, but also consider how much of that is outdated. With Swift anything you find (and there is a LOT right now) is guaranteed fresh.

    If you worry the iOS development market is overcrowded, don't - experienced developers for all backgrounds are badly needed all over.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  39. Don't do apps. by Animats · · Score: 3, Insightful

    You say you're an experienced embedded-systems developer. Those are rare. Stay with that and get better at it. There are already a huge number of people grinding out appcrap, more than the app market can support. Soon there will be a glut of former phone app programmers, if there isn't already.

    Try to get in on the back end of the "Internet of things". That crowd is overrun with appcrap people and has no clue about embedded.

    1. Re:Don't do apps. by seoras · · Score: 1

      Rare doesn't mean jobs out there, rare can also mean specialised and, depending on where you live, hard to find alternative work when your current job disappears.
      I know this from experience, an experience a lot of (soon to be ex) Cisco engineers are going to go through shortly...
      Right now App's is where the programming action is. Don't be put off by the volume of Apps being created.

  40. Support, Knowledge base & Plenty of free Code. by seoras · · Score: 1

    The problem with introducing a new language, no matter how good it is, is that a beginner will find limited online resources.
    Stackoverflow.com has been a godsend for me getting into iOS App development.
    So too has cocoacontrols.com for finding something I want, which I know someone else will have already written and made free.

    Swift on the other hand hasn't been out long enough for there to be enough answers on the knowledge base websites to cover all issues that will arise in the learning curve.
    Nor will there be an avalanche of re-writes of the free, object-c, code utilities that are available.
    AFNetworking springs to mind, a fabulous effort that has saved so many so much time, bugs and frustration.
    You can use a bridge between it and Swift but that's just added complexity and time.

  41. Why not Java? by michael.borcherds · · Score: 1

    To (mis)quote Tony Blair "there is a third way" http://www.robovm.org/

  42. Blog post with language comparisons by gbridge · · Score: 1

    There was a blog post this week (can't remember where I found the link now) that details common problems and how you'd approach them in both Obj-C and Swift. I haven't finished reading it yet but it's pretty clear that the author is sticking with Obj-C for the time being. Worth a read. http://owensd.io/2014/09/24/sw...

  43. Go Cross Platform by Anonymous Coward · · Score: 0

    IOS will be dead and gone inside of 2-3 years. Android is winning far and wide and MS is hard at work coercing CIO's and CTO's to switch to winphones using all kinds of tricks in all of the books. So programming IOS will be a waste of your time.

    The best crossplatform platform is javascript, where you will find a framework such as IONIC, that already has +50.000 apps out there very worth your while.

  44. You'll need both for now by Anonymous Coward · · Score: 0

    We're in transition, so unfortunately you'll need both, at least for the next couple of years. But Obj-C is a very small language compared to C++ or other languages, so it's not hard to master.

  45. I love Obj-C. I've used it since 1989. by jcr · · Score: 1

    But as I've said many times since then, I'll switch when something better comes along. That time has come. Swift is a major improvement over Obj-C, and it was developed to meet Apple's internal needs, by engineers who know Obj-C inside out.

    It's kind of a kick being a beginner again. Swift takes some getting used to, but I expect it to give me as much of a productivity improvement over Obj-C as Obj-C gave me over C++.

    -jcr

    --
    The only title of honor that a tyrant can grant is "Enemy of the State."
  46. Experienced C developer? Isn't that a no-brainer? by Qbertino · · Score: 1

    You're an experiecned C developer? Well, sorry, but that's a no-brainer then. Go for Objective-C. Anything else would be really really stupid. You'll have to change some C habits to actually 'get' Obj-C, but you'll live. Obj-C works on every plattform, so you wouldn't be tied to iOS/OS X either. Only upsides to that route for you.

    I OTOH also am an experienced developer, but pampered by 15 years of modern scripting language usage. I would want to learn C++ or Objective-C (I've been trying to pick up C++ for the last 2 years but haven't put enough effort into it yet), especially because im a FOSS Linux Geek, but I hate having to deal with anachronistic shit - so for me actually using an easy-to-use lock-in language would actually make sense - especially if I know what I want to build on iOS exclusively, since I would only do something very product and project specific on iOS. And only if I'm paid for it.

    --
    We suffer more in our imagination than in reality. - Seneca
  47. Empty vessels make the most noise by bwanagary · · Score: 1

    I read a few of these posts by zealots for "this" language or "that" language. There is a right tool for every job, and in many cases, more than one tool that will do the job. The questions to ask yourself it which languages meet the your criteria:
    * Do you want another language as a marketable skill?
    * Do you want to write and sell iOS apps?
    * Do you want cross-platform functionality?
    * What functionality is that? Is it single code-base native GUI on multiple platforms? Do you want to write games, communications, accounting programs, robotics, web apps?
    * ... etc.
    For every language you entertain there'll be a bunch of zealots espousing it's virtues and an equal group of naysayers panning it. A programming language is a syntax, but also in today's world it is dependent on a massive class library (functions in 'C'-speak). There is a mental "mindset" around each language also that once you "get" it, the language will make more sense and be more powerful and natural for you.
    Coming from 'C' (either Kernihan & Ritchie or ANSI) your biggest transition is going to be to the Object-oriented paradigm. I say learn more than one language so that you have a basis for comparison. And make one of those languages a "scripted" or "interpreted" language - something that you don't have to compile to test as you learn. Ruby and Python come to mind but there are plenty of others. Once you get your head around objects, then look at the compiled languages. Moving to C++ or Objective-C will be pretty familiar because of your 'C' background - but not trivial. The same way Basic programmers can write a 'Basic' program in the 'C' syntax (which is a horrible program) you can write a 'C' program in C++ or Objective-C or C# or Java, with an equally horrible result. Once you get your head around the whole idea of Object-oriented programming, you have to learn the massive, and I mean MASSIVE class libraries of .NET for C# to be useful. The same goes for Java - you have to learn the massive class libraries in order to leverage those environments. Even interpreted languages like Ruby, Python, Perl et al have modules or libraries that you will need rather than "roll your own". With 'C', the joke was that you have to "sire your own user community" - but the "modern" languages (read "newer than 'C') come with classes/functions/tools to do almost anything imaginable today - all you need to do is learn which class/method/function does what.
    I've started programming computers 40 years ago ;-) and I still code today (amongst other things), in many languages, because I like something about each of the languages. It isn't an "either or" thing - for some projects .NET might be a better fit as long as you only want to code for Windows. For another project, Ruby, SCALA, Java, whatever. (NOTE: For all the purists jumping up and down right now, the C# language doesn't run only on Windows platforms, but it is so tightly linked with the .NET environment and dependant on the CLR that it's not terribly useful in a non-Windows environment. Yeah, I hear the LINUX zealots shouting "mono" at me, but really...)
    Learn more than one, and at least one interpreted, scripted object-oriented language. I add "scripted" because your could argue that that any language that has a runtime or JVM could be "interpreted". You asked our advice - well, that's mine :-)
    FWIW I was a straight 'C' programmer for many, many years and made the difficult transition to objects and all the other paradigms. It was well worth it.

    1. Re:Empty vessels make the most noise by david_thornley · · Score: 1

      I'm going to suggest that a C background is considerably less helpful in learning modern C++ than it looks. Objective-C is C with a few add-ons. C++ is effectively a different language. If you want to learn C++, great, but it's much, much more than C with Classes.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
  48. Might want to take a look at RAD Studio XE7. by WWE-TicK · · Score: 1

    For those looking for a cross platform solution, there's also RAD Studio XE from Embarcadero (current owners of Delphi and C++ Builder). RAD Studio includes both Delphi and C++ Builder, so you can either go Object Pascal or C++. The cross platform framework you'll be learning would be their Firemonkey API. With this package, you can develop for Android, iOS, and Windows from one code base (however I'm guessing, as with the case with all cross platform solutions, your mileage may vary).

    I haven't tried it myself, but I've been looking seriously into it. I would be interested to see if anybody has actually tried this tool for mobile development and would care to share their experiences.

  49. The Douche Slashdot Needs by Anonymous Coward · · Score: 0

    Do you have the slightest hint as to what a colossal douche you are?

    That is EXACTLY right. I am in fact a giant colossal douche.

    What is the definition of Douche?

    "a jet or current of liquid (as a cleansing solution) directed against or into a bodily part or cavity"

    That is exactly what I do - a jet of truth fluid directed squarely against a bodily part or cavity (like an Anti-Apple asshole such as yourself).

    The world badly needs more douches to wash away the mental stains left by people like yourself all over the internet.

    To claim I am a force for cleansing is ironically the most accurate statement you will ever make in your pathetic life.

    1. Re: The Douche Slashdot Needs by Anonymous Coward · · Score: 0

      hahahaha. well done. I spit out my milk.

  50. Objective C by Anonymous Coward · · Score: 0

    Why? My $0.02 take it as you will.

    Since you already know C/etc. picking up Objective C should be relatively quick, most just understanding it's OO functionality and associated OS libs, and swift, well, maybe it will be used and maybe Apple will drop it like a cold dead turkey in a year or two, so why invest the time unless you enjoy learning a completely new programming language and libs for fun, which would be the way that I'd approach swift ATM.

  51. More Very Outdated Info by SuperKendall · · Score: 1

    Remember how long it took to lay Carbon to rest.

    Carbon was an entirely different set of frameworks.

    Swift on the other hand uses all of the existing frameworks - only the have tweaked the Swift definition of the endpoints such that it's more Swift friendly (like knowing when arguments or return values will or will not be null for sure).

    So there is zero Carbon-Like transition time involved.

    I'm not drinking the Apple Kool-Aid, I am telling you what is happening in real-world iOS development today. If you learn anything but Swift you are going to be WAY behind state of the art inside a year.

    I'd say it's 50/50 whether or not Swift will get enough traction to continue on.

    Jumping horny ghost toad of Fernando, you are not really that stupid, are you? Please tell me you are just trolling? You really don't understand what happens when Apple puts weight behind a development technology? Wow.

    In one year I will re-link to your post in EVERY Slashdot post you make.

    At this point I wouldn't even buy whatever CEREAL you normally buy, with judgement like that.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  52. false by SuperKendall · · Score: 1

    Swift on the other hand hasn't been out long enough for there to be enough answers on the knowledge base websites to cover all issues that will arise in the learning curve.

    Between Apple's excellent free books and StackOverflow (which is brimming with Swift questions and answers) that is not at all true. Any issue you run into coding Swift is well covered by online resources already.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  53. Dude, you ain't gonna port iOS to Android by Anonymous Coward · · Score: 0

    There's a reason why every new app announcement says the iOS version is out now, and an Android version is coming later. It's not that easy.

    The worst thing that could ever happen to an Android developer is to get some GUI designer who draws user interfaces in Photoshop and hands them off to an iOS designer to implement in a pixel-by-pixel exact way, because that's not how Android works, and trying to explain relative layouts to a Photoshop person is not easy.

    You are not going to port code, either. Android and iOS work ... well, inside out from each other. An iOS design is going to be a bad Android design, and vice versa. They're event driven, but backwards. iOS delegates everything to your main class, and Android uses Java's listener model.

    Some of your back-end design might port conceptually, but even that's iffy. Maybe if you use a lot of web services.

  54. Swift is very fast by taharvey · · Score: 1

    If you'd bother to look at current Swift benchmarks, not the initial betas, you'd see it racing passed C code due to its inherent parallelism.

    See: http://www.jessesquires.com/ap...

    In a series of typical sort tests, Swift bests objC in these tests by 6-18 times, both using Clang & LLVM. Yikes!

    1. Re:Swift is very fast by Cyberax · · Score: 1

      Inherent parallelism? Whut? Swift uses refcounters that kill any kind of inherent parallelism.

    2. Re:Swift is very fast by taharvey · · Score: 1

      Refcounts don't kill the parallelism.

      Apple went down the path of extensive parallelism using queue-based thread pools (libdispatch) several years ago... this is pretty optimal approach to concurrency. In C/C++/objC Apple added the extension for "blocks" to GCC and Clang which are the same thing as lambdas. Swift has the idea of lambdas built right in from the get-go. Libraries using libdispatch deep down, together with language hints that help autovectorization, make it so Swift enjoys parallel excution not unlike a functional language, but at native speed.

  55. Try a cross-platform framework by dogbox · · Score: 1

    I'm currently writing a project using Xamarin ( http://xamarin.com/ ). Did the Objective-C thing at a previous job for about 6 months. C# is way way better than Objective-C, and you get the added bonus of being able to reuse your business logic (and even some of your UI depending on how you write it) across platforms. There is some overhead in learning the apis through C# instead of Obj-C, but its more than made up for by a better language and cross-platform reuse of code. Not as many examples of how to use apis in C#, but, for the most part, its pretty trivial to translate things from Obj-C. The worst bit is that existing third-party libraries are substantially harder to use. You do have to pay for a license for apps over a certain size, but its only $25/mo for an indy developer.

  56. It's Apple by ArcadeMan · · Score: 1

    Apple are known to ditch current technologies if they think they have a better option for the future.

    They dropped their own proprietary ports in favour of USB.
    They dropped floppy drives around the time USB flash drives appeared.
    They dropped SCSI in favour of FireWire.
    They dropped PowerPC in favour of x86.
    They're currently dropping FireWire in favour of Thunderbolt on most of their computers.

    They may still be supporting Objective-C in parallel to Swift today, but what makes you think Swift won't be the only option in a few years?

  57. Porting to Android is trivial (is it?) by niw3 · · Score: 1

    Apportable lets you compile Objective-C to native ARM and x86, making porting trivial. I heard many success stories but did not actually use it myself. But having one code base is too good an opportunity to miss. I would like to hear downsides as well. Any developers using apportable to do Android ports, reading this, please share your experiences.

    1. Re:Porting to Android is trivial (is it?) by zenkey.zencode · · Score: 1

      It's utterly trivial with Kivy (http://kivy/org). You have virtually no OS differences unless you want to make use of OS specific functionality. Thankfully, Kivy provies Python wrappers for native iOS and Android calls via Objective C and Java wrappers. It really works well and it's truly open: MIT licensed...;-)

    2. Re:Porting to Android is trivial (is it?) by zenkey.zencode · · Score: 1
  58. bulllshit by Anonymous Coward · · Score: 0

    bullshit, that makes no fucking sense

  59. Right now, Obj-C by Anonymous Coward · · Score: 0

    My experience with Java haters: usually they've spent a lot of years with it.

  60. Say no to both ObjC and Swift by yenic · · Score: 1

    I am well-versed in C, I have thus-far avoided C++, C# and Java

    If you've successfully avoided anything except for C, it doesn't sound like you're too ambitious to pickup much new. I can't say I blame you. I'd skip both ObjC and Swift.

    I don't see you actually learning 3 new languages and 3 new frameworks if you've stuck with C and avoided nearly everything in the past 30 years. Look into Xamarin (C#) or Cordova (JS), depending if you need more native-level performance or can get by on a webapp.

    --
    http://www.accountkiller.com/en/delete-slashdot-account Stop visiting Slashdot.
    1. Re:Say no to both ObjC and Swift by kailasnatha · · Score: 1

      Or you could even have some real fun and try LiveCode, which is now open source and you get export your project to iOS, Android, Windows and Linux and Mac with "the push of a button." There comes a time when you may feel that mucking around in any flavor of C is not something you want to do with your life/time/midnight oil... any more...you have better things to do with your time and your brain. These 4th generation scripting languages are easy to learn, lots of "fun" and have a productivity factor of 10 to 1 over writing in any flavor of C. Elitist programmers think "Hypercard" was for children, but xTalk (LiveCode is the current leading incarnation) is still alive and will be alive long after Swift comes and goes. If NASA can use LiveCode to run satellites, you can certainly use it to write your one-off mobile app. Or like like Yenic says, go for one of the new HTML5/JS frameworks that will run on any mobile device... FireFox OS is going to be big in the not too distant future. They just released in India with smart phones at $US33.00. So if the world is your target, HTML5/JS is a good direction.

  61. C# for maximun portability to Android and WinPhone by Anonymous Coward · · Score: 0

    C# (on Mono) with Xamarin as the IDE: you'll obtain sonewhere around 80-95% code reuse, and the development time will be a lot shorter.

  62. Java is fast by Anonymous Coward · · Score: 0

    Actually, Java is really really fast today and in theory can be faster than C++, because it is adaptive optimized. For instance, if you run a for loop with a class of objects, and the next time, there is a different subclass in the for loop - JVM can optimize for each subclass. Dynamically. C++ can not do that, it has been optimized once and for all, it is static and can not adapt to the different data that is processed at different runs.

    For instance, NASDAQ's large stock exchange system on Wall Street with huge throughput and extremely low latency, is written in Java 100%. All fast stock exchanges today, with sub 100 microsecond latency, are written in Java or C++. So, you just need to avoid trigger the Garbage Collector in Java, and your stock exchange system will fly. Its quite simple to do actually, and NASDAQ does that all the time. You can never have a stock system pausing while GC for a second, the High frequency Trading customers would go to another exchange instead.

  63. Objective-C is an Elegant Concept by Anonymous Coward · · Score: 0

    If you look at the difference between C and Objective-C, you will be amazed about how little changed. Brad Cox was clearly a genius. I mean its about 10 new things to know.

    Below Stolen from Wikipedia:

    All objects can trace back to the NSObject in Apple's version of Objective-C.

    id return type is a pointer to any object.
    Sending a message:
    [obj method:argument]; -> send a message to an object

    Defining an Interface:
    @interface classname : superclassname { // instance variables
    }
    + classMethod1;
    + (return_type)classMethod2;
    + (return_type)classMethod3:(param1_type)param1_varName;

    - (return_type)instanceMethod1With1Parameter:(param1_type)param1_varName;
    - (return_type)instanceMethod2With2Parameters:(param1_type)param1_varName param2_callName:(param2_type)param2_varName;
    @end

    Defining an Implementation:
    @implementation classname
    + (return_type)classMethod
    { // implementation
    }
    - (return_type)instanceMethod
    { // implementation
    }
    @end

    Method Syntax:

    - (int)method:(int)i
    {
      return [self square_root:i];
    }

    Object Instantiation (creation)
    MyObject *o = [[MyObject alloc] init];

    Protocols (Interfaces in other languages)
    @protocol NSLocking
    - (void)lock;
    - (void)unlock;
    @end
    denotes that there is the abstract idea of locking. By stating in the class definition that the protocol is implemented,

    #import[edit]
    In the C language, the #include pre-compile directive always causes a file's contents to be inserted into the source at that point. Objective-C has the equivalent #import directive except each file is included only once per compilation unit, obviating the need for include guards.

    Object Creation and Allocations, and Initiation:
    The alloc message allocates enough memory to hold all the instance variables for an object, sets all the instance variables to zero values, and turns the memory into an instance of the class; at no point during the initialization is the memory an instance of the superclass.

    The init message performs the set-up of the instance upon creation. The init method is often written as follows:

    - (id)init {
            self = [super init];
            if (self) { // perform initialization of object here
            }
            return self;
    }
    In the above example, notice the id return type. This type stands for "pointer to any object" in Objective-C (See the Dynamic typing section).

    The initializer pattern is used to assure that the object is properly initialized by its superclass before the init method performs its initialization. It performs the following actions:

    self = [super init]
    Sends the superclass instance an init message and assigns the result to self (pointer to the current object).
    if (self)
    Checks if the returned object pointer is valid before performing any initialization.
    return self
    Returns the value of self to the caller.
    A non-valid object pointer has the value nil; conditional statements like "if" treat nil like a null pointer, so the initialization code will not be executed if [super init] returned nil. If there is an error in initialization the init method should perform any necessary cleanup, including sending a "release" message to self, and return nil to indicate that initialization failed. Any checking for such errors must only be performed after having called the superclass initialization to ensure that destroying the object will be done correctly.

    If a class has more than one initialization method, only one of them (the "designated initializer") needs to follow this pattern; others should call the designated initializer instead of the superclass initializer.

    You now know the basics of Objective-C.

  64. Well a lot of headhunters aren't too Swift by Anonymous Coward · · Score: 0

    Give 'em five years, they'll start to make sense

  65. quietly added code is a run-time hit by Anonymous Coward · · Score: 0

    Not a big one, and unlike GC a deterministic one, but a run-time hit none the less.

  66. How about Python? by zenkey.zencode · · Score: 1

    Why not use Python and run on iOS/Android/Windows/MacOSX/Windows with one codebase? http://kivy.org/

  67. Codename One by mlauzon · · Score: 1

    'If/when I decide to port my iOS App to Android (and/or Windows Phone)?'

    To answer your question, you should check out the IDE called Codename One, it allows you to develop for a bunch of mobile platforms all at the same time:

    http://www.codenameone.com/

  68. Native Cross-Platform? Learn C# and use Xamarin by michaelpearls · · Score: 1

    I know there are many different ways to get to where you're going. But if you're going to be learning a new language, you should consider making it C# and use Xamarin, the cross-platform solution that will let you develop for Android, iOS, and Windows Phone using shared code and great native code. It's better than the HTML5 approach as it gives you access to native functionality that HTML can't access. I am originally a C# developer, so it was a no-brainer for me, but I still recommend that you at least take a look at it.

  69. Rust / Servo by jbolden · · Score: 1

    Rust has no killer-application driving it.

    What about Servo?