7 ms·
A curious question - why is Objective-C not used very widely outside of Apple ecosystem? I was playing with it for a while even before iPhone was a thing and I
by runn1ng 11y ago
A curious question - why is Objective-C not used very widely outside of Apple ecosystem?
I was playing with it for a while even before iPhone was a thing and I kind of liked it, but it's basically only for Apple devices. Nobody on Linux or Windows sides uses it for anything.
I have had the misfortune of using GNUStep about a year ago, and it's, unfortunately, still very buggy. Why is there no more activity there?
- protomyth 11y agoC++ was used in Windows, and Objective-C never had an official standard. It was also considered a direct descendent which got used in UNIX. Objective-C really needed a standard library. The cranky person in me would also point out comp.lang.objective-c had an individual who really hated NeXT and made life heck on others.
- TickleSteve 11y agoAt the time of NeXT, you did pay for some of the dynamic-'nice'ness of ObjC with efficiency... and efficiency was critical in the days of 16MHz 030's. Like many technically-superior technologies, they don't find market success because of momentum of an inferior product.
- protomyth 11y agoIt was actually quite nice to use. Windows felt a lot more sluggish than NeXTSTEP on the same hardware.
- deleted 11y ago[deleted]
- tosseraccount 11y agoDid Windows and Nextstep run the same hardware?
- protomyth 11y agoYep, NeXTSTEP 3.3 had and Intel version (as well as versions for other hardware). I had the NeXTSTEP 3.3 and 4.x on an Intel 90MHz Pentium with a SCSI drive (Microway was the company I bought it from). NeXTSTEP was smooth, and Windows was a tad bit cranky.
- mschaef 11y agoIn a manner of speaking, yes. It ran on PC hardware, but when it was first released the system requirements were at the high end of the spectrum. (Local bus, 32MB RAM, fast disk, specific graphics cards, etc.) In 1993-4, I lived in a dorm over a store that focused on NeXTStep/PC hardware (Omegabyte in Austin, TX), and remember it being around a 4-5K proposition to get started, at least. Flash forward a couple years to Summer 1995, and the NeTXStep system requirements are easier to attain. Unfortunately, by then both Linux and Windows 95 have made it a lot less important.
- JulianMorrison 11y agoWithout an integrated framework, it's just an OO mechanism hung off the side of vanilla C. And while that mechanism does have some sweet features, it's also slow and really weird looking for someone who's used to C, and seeing it in the middle of C code is like in a Bollywood movie where they suddenly break out into song.
- jasonjei 11y agoLove the analogy. Not to leave course of the original comment re:ObjC, but I think to a certain extent you don't see C# really being used outside the Microsoft ecosystem, as Mono does exist. An integrated framework is probably the programming language equivalent of having an "army and navy."
- rubber_duck 11y agoProgrammimg is soo based on trends and not on technical merits : Dart is a great language - it's way more feature complete than typescript, it comes bundeled with official package manager, build system and a dev server (huge value compared to the js ecosystem schicoprenia) and it's designed by people who actually know their shit and have decades of expirience in both language design and VM implementation/compilers (isn't constrained by JS design decisions) Dart started marketing it self as a JS.next, IMO unrealistic goal, but has dropped that agenda for like 2 years now (?). It still dosn't prevent people from making uninformed comments about it being a failed google js.next language. It's really an amazing ammount of working tools and code in that project, waay better than angular 2 js/typescript for example but people won't even evaluate it because of reputation. The same is true for .NET, Microsoft took JVM and Java and then took it to the next level - stuff that just got in to Java (Lambdas) or will be getting in years (Value types) have been a part of .NET for a decade now - and in recent years Microsoft made a 360 on cross platform and OSS with Core.CLR - this is not even mentioning F# being a MS sponsored and supported tool with the tooling support that implies, and just the best in class tooling with VS in general. Yet most people won't even touch .NET because it's not hip.
- jorgecastillo 11y ago
- pjmlp 11y agoBecause people keep forgeting that languages alone are worthless. What matters are tooling, libraries and vendor support. GNUStep is quite old and only had a couple of devs maximum working on it, already since the NeXT days. Also gcc never had 100% support for the Objective-C runtime, there was just the initial contribution that FSF forced NeXT to do.
- runn1ng 11y agoAgain it might have changed since the last time (about one year ago), but I was trying to port a command-line utility from OS X to Linux using GNUStep, and it was so buggy it was almost useless. So I gave up.
- mpweiher 11y ago> What matters are tooling, libraries and vendor support. Yeah, I thought so, too. Then we built a content management system in Objective-C on Sun/AIX/Linux. We had a so so Foundation and that was it. It was amazing. Completely changed my mind.
- pjmlp 11y agoWell Web Objects were the genesis of J2EE actually and were great. Probably only Smalltalk had a similar experience in those days, with commercial Lisp vendors already fading out.
- Negative1 11y agoMade myself learn it back when the AppStore was first released and the downsides are mostly related to the strange syntax and strange memory management model. It definitely has some good features and I do like the verbose style of inline naming (which is great for auto-documenting) but the downsides far outweigh the upsides. Java as a competitor is just a much easier language to read and write, though I would not say it is a better language. It gained widespread adoption because of that ease of use and ability to run on so many platforms. Whether you agree or not, C++ is perceived as a better language and is definitely better supported across multiple platforms. As an example, making an App that shares code on both iOS and Android is impossible without the Native C++ bridge on both. So despite the failings of the language (of which there are many), it really comes down to portability. This is why Swift is such an interesting experiment to me. As a language it is pretty good, very modern and easy to understand (though not super expressive or powerful), but, the thought of using it for both Android and iOS development is actually very appealing to me.
- tosseraccount 11y agoJust a clarification. I think the interface can be even "lower" than C++ ... C interface to iOS: http://stackoverflow.com/questions/10289890/how-to-write-ios-app-purely-in-c http://stackoverflow.com/questions/10289890/how-to-write-ios... C programs can access Android's JNI ( http://developer.android.com/ndk/samples/sample_hellojni.html http://developer.android.com/ndk/samples/sample_hellojni.htm... ).
- runn1ng 11y agoInteresting. The syntax and the memory management is something I liked almost immediately, even when it's totally alien to other languages. Once I got it, I wondered why are not other languages cool like this. And then I never used it again in real life (since back then nobody had Apple, and then I moved to javascript...)
- krzat 11y agoWhy would anyone want to use it? Especially before ARC. Apple created Swift for a reason.
- thought_alarm 11y ago(Some of the responses here are hilarious. I feel like I'm reading a Slashdot thread from 1998.) I think it's interesting to compare Objective-C with Microsoft's COM. Both originated at roughly the same time (late 80s). Both aim to add dynamic, object-oriented features to plain old static C. Both provide a thin runtime library and C-based API to bring those features to C. Both use the same reference-counted memory management. Both allow you to dynamically load objects at runtime, and query about the capabilities of these dynamically-loaded objects in a general way. Both have been integrated into multiple different object-oriented programming languages. Objective-C differs in that it is both a runtime library and a language, where COM is just a runtime library. COM become hugely popular in the late 90s. While it's natural to use COM to implement a plug-in framework for an app, people started to use COM for everything. This led to the deCOMtamination movement of the early 2000s. I too did a bunch a COM development in the late 90s, just like everyone else. If I knew then what I know now, I would have ditched COM entirely and used Objective-C and OpenStep. But even if one had a time machine and could travel back to 90s with knowledge of the future, there is no way you could convince anyone else to ditch COM for Objective-C. The syntax is unusual to C, C++, and Java programmers, and there are just too many misconceptions about Objective-C floating around (e.g., see some of the other responses in this thread). Objective-C has many interesting features that make it ideal for doing the kind of large-scale client-side desktop and mobile app development that it's known for. But I think the truely compelling aspect of Objective-C is the cohesion between the language and UI frameworks that make up Cocoa and Cocoa Touch. The frameworks and the language were developed hand in hand. Objective-C without the Frameworks isn't compelling to people who aren't already familiar with the language, and those frameworks are (now) only available on OS X and iOS.
- ams6110 11y agoCOM was popular, yes, but it was a nighmare. Remember all the threading models? Here's just a taste: When a free-threaded apartment (multithreaded apartment model) in a client creates an apartment-threaded in-process server, COM spins up a single-threaded apartment model "host" thread in the client. This host thread will create the object, and the interface pointer will be marshaled back to the client's free-threaded apartment. Similarly, when a single-threaded apartment in an apartment-model client creates a free-threaded in-process server, COM spins up a free-threaded host thread (multithreaded apartment on which the object will be created and then marshaled back to the client single-threaded apartment). I remember thinking I sort of understood this back in the day, but now I'm pretty sure I didn't.
- fulafel 11y agoApple/NeXT fought it. To the point of GPL violation in their GCC fork.
- p0nce 11y agoMaybe what the Objective-C runtime does isn't really needed? It doesn't make much sense to have every method patchable, it doesn't make much sense to be able to build classes at runtime, and it doesn't make much sense to have all calls go through a trampoline (with a selector that must be get with another call).