6 ms·
C in Danger (and thus Higher-Level Languages?)
- mattj 16y agoObjective-C is C plus brackets and a recv message function. Everything else is built up on that. You can very easily use c libraries in iPhone / iPad development. Maybe this is true on android, but iPhone is a great platform for c programmers.
- rbanffy 16y agoANSI C code is perfectly legal Objective-C code.
- brianobush 16y agoso I can just run my regular code in Obj-C and it should work with minimal boiler plate? I guess the barrier to iphone dev isn't as high as I was imagining.
- pyre 16y agoObjective-C is much closer to the 'just a pre-processor on top of C' idea than C++ is at this point. ANSI C is still valid, though to hook into Apple's CocoaTouch APIs I believe that you will be forced to write ObjC.
- ryanpetrich 16y agoYou can use plain C, it's just not pretty: void *result = objc_msgSend(target, sel_registerName("message:"), argument);
- rbanffy 16y agoMind you: not pretty, even for C standards ;-)
- varjag 16y agoDoes it support C99 constructs as well, or just ole' C90?
- pyre 16y agoI think so. I believe that it just converts all of the ObjC constructs into valid C. The ObjC constructs are different enough from C (being SmallTalk-inspired) that I don't think it's an issue. Take this with a grain of salt though, as I have minimal ObjC experience.
- deleted 16y ago[deleted]
- itistoday 16y agoThe premise is that because Windows Mobile does not allow, and Android makes it very difficult to run C code, that therefore "C might be on a decline as the universal programming language." (He incorrectly states that the iPhone "only" allows Objective-C). That's not very convincing. Until Apple, Microsoft, Google and others start writing their operating systems in Java/C# instead of C, I wouldn't worry.
- jshen 16y agoWriting the OS in C doesn't mean that the main apis are in C. That's the point. I can't compile my favorite language on android and easily access the main android apis like I always could in the past. He specifically mentioned the difficulty with things like erland, couchdb, and firefox.
- Avshalom 16y agoMicrosoft did write their an OS in C# though, and who knows, it might rear it's head again someday.
- rbanffy 16y agoMicrosoft's plan was to build most of Longhorn on managed code. For what was publicly said, it became clear that plan didn't work out, they had to scrap most of what was written up to then and start from more or less scratch. Vista was released late as a result, Jim Alchin retired and the same codebase lived on to become Windows 7. Lisp machines, I think, proved the concept that, if your CPU is clever enough, even the low-level code can retain a high-level of abstraction. Sadly, I have none to play with. Someday I intend to correct that.
- contextfree 16y agoThey are still attempting to do this with Midori: https://careers.microsoft.com/JobDetails.aspx?jid=8160 https://careers.microsoft.com/JobDetails.aspx?jid=8160 "The Technical Strategy Incubation team is looking for a senior software architect to lead development of the Kernel for a novel operating system. Because this is an incubation, the candidate must have a high tolerance for uncertainty. Experience in startups is a plus. Our Kernel is a non-traditional design divided between a native C++ microKernel and additional managed C# operating system functionality which is injected into each independent hardware address space. The system uses lightweight isolation and capabilities as the basis for security, is built from the ground up for safe concurrency, and enforces unusual principles like "no unsafe shared memory." ..."
- stcredzero 16y agoI think that Apple should find a way to certify languages that expose all of the iPhoneOS APIs without an excessive penalty for runtime footprint. So long as all of the APIs are exposed in an easily used fashion, then it just becomes another way to code on the iPhone and Apple remains in control. This would enable languages/environments like Scheme and Mono to operate on the iPhone.
- robot 16y agoAnother article that sees only the high-level side of software development and comes to wrong conclusions. C is going to be there universally until the cpu hardware changes dramatically, such that it maps one to one to some other language. That's where the universality is coming from. C maps directly to what cpu understands.
- cpr 16y agoYep, C is pretty much the universal assembly language with some sugar on top.
- chbarts 16y ago> C is going to be there universally until the cpu hardware changes dramatically Except, hasn't this happened already? C fails to express the concepts of NUMA^, SIMD (or equivalent), pipelining (or other instruction-level parallelism), out-of-order execution, or distributing load across multicore processors. To do anything like these things I either need to do them by hand (semaphores, mutexes, inline assembly) or rely on bizarre compiler tricks and hope the optimizer picks up on my intent. ^(The late, unlamented 'register' keyword came close to expressing this, back long before it was needed as much.)
- lutorm 16y agoIt seems a little funny to claim that C is in decline because of Android, since the Linux kernel most definitely is C. But I was very disappointed when I checked out the Android SDK the other day and noted that it required me to use Java.
- pgbovine 16y agosince the Linux kernel most definitely is C. how many people do you know who write kernel (or other low-level OS code)? i think there are now more and more devs writing apps than systems code, which means a rise in the use of higher-level languages (just my wild speculation)
- tetha 16y agoI think the comments and the article confuse two things. (1) C is in danger of actually dying, as in: going away (2) C is in danger of losing some share of application development. I think #1 is just not true. Almost every close-to-metal programming uses C. Yes, it is true that not many developers do this close-to-metal programming (which would include kernel development, driver development and embedded development), however, this close-to-metal development is very, very important, because it is the foundation to all application development. And at the moment, C and C++ are the foundation to the close-to-metal programming. Thus, C and C++ are pretty much the foundation of application development. Maybe hidden, but certainly alive and important. On the other hand, C has already lost a lot of shares in application development, if you define application as some custom buissness application, maybe web-based, maybe gui-based and I certainly agree that C will lose more shares in this area. And I have to say, this is a good thing. The focus for C is just different from the focus one needs for such application development, because for higher level application development, maintainability and extensibility are more important than using every cpu cycle and every memory byte to the most effect. tl;dr: In my opinion, C is a small important layer in the stack and not in danger in the area C was made for.
- jacquesm 16y agoWithout further analysis or background, just looking at the figures and the ordering it would appear to me that that table is incorrect in several ways at least. Pascal usage greater than actionscript? Delphi on the rise and javascript dropping? Python dropping? Go already larger than actionscript? I don't buy any of that.
- billswift 16y agoWhere did you see the table and stats you are talking about? There were neither in the linked essay.
- jheriko 16y agoC should die, but only when a better alternative is available...
- billswift 16y agoI don't see C dying until we have computers with radically different architectures. C is too good a fit for current computers and there is too much installed base and too much cost for conversion for things to be switched over until it is really necessary.
- rayvega 16y agoQuite the opposite: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html http://www.tiobe.com/index.php/content/paperinfo/tpci/index....
- eande 16y agothat search result has been questioned by many, see http://news.ycombinator.com/item?id=1341553 http://news.ycombinator.com/item?id=1341553
- kentosi 16y agoTowards the latter portion of the article he talks about cross-platform development. Though I agree that this would somehow get reduced, I can't help but feel that this would also have some good points. The write-once, run-anywhere ideals have only applicationst hat work beautifully on the original platform they were developed on, and poorly on others (eclipse on mac, skype (before they re-wrote it for mac), itunes on windows, etc.) I'm all for nativeness.
- s3graham 16y agoAny recommendations for fleshed out languages/tools that can export to ObjC (ignoring 3.3.1 for now), Java, and C#? I suppose the easiest version is a Blub that does only what they all can easily do language-wise and mobile-API-wise. edit: HA http://xmlvm.org/overview/ http://xmlvm.org/overview/ I just tasted some throw-up.