Hacker News new | past | comments | ask | show | jobs | submit login
Objective-C is like Jimi Hendrix (2014) (frabjousdei.net)
34 points by mpweiher 8 months ago | hide | past | favorite | 29 comments



Comparing Jimi Hendrix to Objective-C is like comparing Ken Thompson to a guitar. Musician, instrument. Painter, brushes.

Besides, as far as I know, Objective-C only ever gained traction within the very narrow realm of MacOS and iOS application development, and has since been mostly supplanted by Swift in both of those use cases. That's hardly comparable to the enduring, cross-cultural influence of Hendrix.

If we're making weird anthropomorphic analogies, I'd argue Objective-C is more like Sleep, People Under the Stairs, or maybe The Replacements. Enormously important within the scope of their own subculture.


Analogies aside, Objective-C gave rise to NeXT and Lotus Improv on the NeXT which were the greatest things. I'm not particularly attached to the language but wonder why we don't have nice things like those anymore.


Even on MacOS. I was playing with XCode recently (I don't normally do Mac development as such even though I use Macs as my primary computers) and was disappointed to see that they've gotten rid of Interface Builder as far as I can tell, as that was one of the greatest things modern MacOS inherited from NextStep.


Interface Builder has just been integrated into Xcode for a very long time now.


Interface Builder was the coolest thing, especially its struts-n-springs-constraints. Xcode is in contrast among the worst visual builder I've used, everything feels so tedious. (AutoLayout is the real thing and Xcode's UI feels 2nd class.) Did they also get rid of those connections between code and widgets? That would make sense as it's such a lone mechanism to be foreign to most now.


Struts-n-springs-constraints and outlets are still available.


I wish it hadn’t been. It’s been considerably more slow and buggy ever since the merge. Pre-merge I loved using it, but post-merge I avoid it in favor of code, except for Mac projects which is where it’s least buggy.


I don't claim to be an expert on Xcode but when I was playing with Xcode 15 the UI editor seemed nothing like Interface Builder -- not only from NextStep but even from earlier versions of Xcode.


You may have been working in a SwiftUI project which does things differently from the older IB ways


I guess I'm too young to understand the phrase "Even on MacOS" here, as the developer experience I personally know on MacOS is worse than the one on Windows in a variety of ways, and it's not a high bar.


And don't forget WorldWideWeb, the first web client created by Tim Berners-Lee


Can you further detail the "nice things"?

Is it "why is electron the easiest way to ship desktop software on every platform?" Or something else? A quality without a name?


Nice things like nil pointers and a foundation of C.


The C foundation was absolutely essential for doing real-world useful things in Objective-C.

Writing a GUI image editor? Your underlying pixel buffer types can be plain C and you can use all the C libraries that exist. No cost of bridging those data types to the late-bound object-oriented Obj-C world where your GUI is implemented, and no constricting interface hoops like Java Native Interface. If your GUI code needed to read a pixel, you could just do C pointer arithmetic right there.

And the same goes for audio, networking, and anything else you can imagine on a desktop where all the underlying stuff is C.


> comparing Y to X is like comparing...

The OP's simile is unintelligible and unconstructive. Now whether we can determine just how unintelligible and unconstructive it is by offering Yet Another Faulty Comparison is left as an exercise for the reader. ^_^


> Besides, as far as I know, Objective-C only ever gained traction within the very narrow realm of MacOS and iOS application development, and has since been mostly supplanted by Swift in both of those use cases.

I would take a step further and point out that Objective-C was forced upon developers by Apple as the official tech stack to develop software targeting macOS and iOS. If that was not the case, I seriously doubt it would have gained any traction at all.


Isn't that how it usually works with any given platform? Developing most of it with a given toolset which is then regarded as 'natural' or 'official', while developing for it with other tools becomes less viable or desirable due to lack of work and official support?


> Objective-C was forced upon developers by Apple

That turns out not to be the case. In fact Apple initially pointed developers at everything but Objective-C.

1. Carbon ("all life forms are based on Carbon")

2. Java. Remember all the sample code in Java?

3. "Modern syntax".

All these quickly fell to the wayside, as people overcame their mostly superficial angst ("uuuh, square brackets and keywords, how will I ever survive") and saw that Objective-C delivers the goods.


The way some of my colleagues gush about objC, I wonder. I honestly can’t stand objC. This is coming from someone who coded in C for many years. Swift is such a huge improvement.


Having both worked with Objective-C and with Pharo (a Smalltalk descendant), I would argue that the introspection, for example, is a Smalltalk influence. Of course, as some know Objective-C is inspired by Smalltalk, among other languages


I started learning Obj-C and AppKit in the mid 2000s. During that process I had a moment of zen when I realized that everything I had learned and done with C++ and COM in the late 90s was completely wrong.


I'm not sure about the title, which just seems weird.

But I think the broad point in the short post is right. Objective-C may look horrible today, but compared to the other choices at the time of its debut; it looked pretty damned good and even better because it was what NeXT was attaching its UI tooling to -- and compared to what was around at the time InterfaceBuilder was unreal good.


Objective-C is the anti-TypeScript. I don't mean this as an insult.


… to either?


Objective-C is a great language that introduced automatic reference counting among other things. Unfortunately it is tied to C, and modern safety measures prevent developers from using C in application code. That's why Apple forced developers to use Swift, which has little new to offer other than being tied to Apple frameworks.


I don’t think that’s really fair to Swift. It has some really interesting things to say about devirtualization, compiling generics, and even memory management. It’s not necessarily a better language than Objective-C for every task, but it’s certainly very different.


It might have introduced some to reference counting, but that is all.

The algorithm is as old as Lisp, and the "automatic" part is a well known compiler optimization pass, when reference counting is used for automatic memory management.


> other than being tied to Apple frameworks

Swift is not tied to Apple frameworks. At all. It is fully compatible with them because of its full ObjC compatibility, but that’s it.


I never hear people talk about ObjC in same breath as they talk about Simula, Smalltalk. There was also Object Pascal. I think these predate Objective C, and changed the game before Objective C.

So I think it makes Objective C more of Michael Angelo Batio.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: