Live data from Hacker News

Objective-C isn't what you think it is

news.rapgenius.com

71–80 of 101 posts

Re: Objective-C isn't what you think it is

#71

Earlier quoted context omitted.

And, um, Mac OS X applications. I know that may not seem like a big deal but many major applications people care about seem to have first appeared on Mac OS / Mac OS X (yes, these are two very different things). BTW: namespaces?! Not exactly my go to checklist feature for languages.

"goto checklist feature?" Does the language have goto? Check. Okay, now let's write a security library! :)

Just to be clear, I meant "go to" (and edited the post accordingly).

Re: Objective-C isn't what you think it is

#72
post #8

Personally I think it's an awful idea to use meta-programming without an exceptionally good reason in production code. Like excessive use of function pointers in C. Just because you can doesn't mean you should. Programming in this style causes more code complexity and will accelerate the rate at a which a codebase becomes a mess, not to mention it's really slow.

Do you know that almost every Mac OS X program uses it? It's the basis of KVO - that's how Interface Builder bindings are implemented.

https://www.mikeash.com/pyblog/friday-qa-2009-01-23.html

Re: Objective-C isn't what you think it is

#73
post #29

Earlier quoted context omitted.

Whichever kind you do, it just has to be optimized for reading the code, not be a leaky abstraction, and stay out of the way of debugging. Static meta programming can be bad in all these ways as well.

I've found that static metaprogramming produces an odd middle-ground. The intermediate code can be wonderfully legible and this lets you quickly find bugs... but when it comes time to fix the bug you have to go into the original generating code and then you find an absolute horror. In this case I'm referring to C# T4.

I wish I could vote this up many many times. Code first EF for c# is much nicer IMO.

Re: Objective-C isn't what you think it is

#75
post #16
post #4

With all the many languages I've used in my life, ObjC is actually my favorite to work with, especially with the modern runtime and features. I first used it in the 90's with NeXT WebObjects and was pleased to see it become popular again.

Sounds like you've not tried a functional language yet in your life :p

I personally prefer Obj-C over almost all the fp languages I've tried. Clojure and Scala being the two big ones but I've also spent a little time with haskel and erlang. I don't hate them but feel like I'm being handicapped instead of helped. Scala was my favorite since I could do either oo or fp. They are all just tools and I shouldn't be limited.

Re: Objective-C isn't what you think it is

#76
post #47
post #42

Earlier quoted context omitted.

Fine, they're different things. My point is that seemingly no one uses Objective C except to make proprietary Apple things. Which is fine, but I always find it annoying when people sing the praises of Objective C but avoid using it for web servers, cli applications... or anywhere else Objective C doesn't have an institutional advantage. I think what people really like about Objective C is not Objective C but Cocoa.

It is called vendor lock-in. And yeah, it is not only Microsoft with their tecnologies that try/tried to do it.

It is called a vendor providing an API for a platform with useful features implemented, so that one can focus on building solutions to one's problems and not reinvent the wheel. Watch out, the way you said it makes you sound like a free software fanatic/proprietary system hater.

I would seriously consider Obj-C on non-OSX systems if it had a better library available (GNUstep doesn't cut it), but that's a chicken-and-egg problem.

Re: Objective-C isn't what you think it is

#77
post #19
post #15

> Objective-C isn't what you think it is A language without namespaces, that's used almost exclusively for iOS apps and nothing else. Nope, that's exactly what I think it is.

The namespaces are inherent in the class name. It's actually a very nice solution. Instead of this Foundation::Array we get NSArray. Way easier to type out, and looks a million times cleaner to me.

Except that with a proper namespacing solution, you just declare that you want Foundation's Array in one spot, and in the rest of the file you just write Array. With NSArray, it's NSThis and NSThat and NSBlah and NSFoo and NSBar and NSNSNSNSNSNSNS everywhere.

Re: Objective-C isn't what you think it is

#78
post #27
post #16

Earlier quoted context omitted.

Sounds like you've not tried a functional language yet in your life :p

Be careful with this kind of thing. You're inadvertently making the FP community look bad. A more constructive and less pushy approach would have been to recommend an enjoyable FP language and explain why you think it suits the parent.

I think the tongue out smiley face means they were playfully joking.

Re: Objective-C isn't what you think it is

#79
post #16
post #4

With all the many languages I've used in my life, ObjC is actually my favorite to work with, especially with the modern runtime and features. I first used it in the 90's with NeXT WebObjects and was pleased to see it become popular again.

Sounds like you've not tried a functional language yet in your life :p

Or you know, he did, but none has as a nice set of libraries and UI stuff as Cocoa, or a multi-billion dollar app market.

Re: Objective-C isn't what you think it is

#80
post #15

> Objective-C isn't what you think it is A language without namespaces, that's used almost exclusively for iOS apps and nothing else. Nope, that's exactly what I think it is.

And MacOS applications. You know, the second bigger desktop platform.

But it's not like "where it's used" matters. That's mostly just a historical accident. If Microsoft had adopted it instead of C++ for example (which is not that outlandish), it would have been used a lot more. There was also NeXT that adopted ObjectiveC (it was developed before it), and OpenStep which also involed Sun and other players etc.

And compared to "being used for iOS apps" (e.g 1 million apps in the most lucrative mobile market", Lisp and Smalltalk are not used even 1/100 that. And Haskell even less (some "success story" here and there, eg an obscure bank, and that's mostly it). Does that make them bad languages?

And the fact that it doesn't have namespaces. Yeah, so like C. So that's important, because?

>Nope, that's exactly what I think it is.

Well, doesn't seem like you do. Or have any extended experience with the language. It's just empty snark to convey "oh, so obsolete".

Post reply on HN