Comments on: Objective-C Is The Language Official blog of Red Sweater Software Sat, 27 Jan 2018 11:27:05 +0000 hourly 1 By: Richard Stallman Tue, 08 Nov 2011 14:26:39 +0000 The memory management mechanism is a shit. It is based on naming conventions. And with the properties have more turns.
Typification is a mixture of weak and strong, with the type id. If you call a method on this type throws a warning, but if an object is assigned to do an implicit cast (though it throws warnings if you want to assign a protocol implemented!)
It has constructors
Delegates are strongly based on, but no inner classes
No null pointer validation, it simply returns null. Go encountered an error when chained method calls.
It has no namespace, such as packages.
There is no decent bookstores mechanism. In many cases you have to get third-party sources in the application.
Methods have no visibility specifiers. Or are public or are private.
To make private methods to do a trick with a category (or declare them before you call).
There is a protected visibility.
In reality there is no private, because if you invoke a method on the interface is not run it without problems (only gives a compiler warning)
It makes some automatic castings. For example, id to any type. Or a superclass to a subclass (but when the subclass has a protocol throws a warning!)

By: Nik Tue, 08 Nov 2011 14:18:23 +0000 If you come from c/c++ maybe Objective-C looks nice. Less so if you’re coming from Java (which makes way more sense) or Ruby (which is the most elegant language).

[note: I don’t consider c-compatibiltiy an asset in any way – I’d be happy if Apple dumped that tomorrow. pointers? really? give me a break]

Criticisms: The brackets are dumb. Pointers are dumb (though I’ve gotten so used to it by now that I don’t even see the ‘*’ in front of everything). The:method:names where you have named parameters (but you can’t omit one, or define defaults) are dumb. The header files are… well OK they’re fine. Manual memory management is dumb – although they now have automatic compile time memory management which looks super interesting. Anyway having to count references is crazy, and if it weren’t for properties I’d probably have given up. Encapsulation is unheard-of. Subclassing and constructors are weird and fiddle-y.

Good things: Categories. Wow. How I love categories. LOVE IT. General object-orientedness, though I dislike the primitives all over the frameworks. Ruby does that right: Everything is an object, and deal with “efficiency” where that sort of thing belongs, in the compiler / interpreter.
And… frameworks. I am truly impressed with the quality of the frameworks for UI stuff and also for core stuff. The frameworks are fantastic. If you’ve ever written a user interface in Java, discovering Apple’s UI frameworks is a relegation. That’s how it’s supposed to work. Yeah!

AppCode, which is a full on IDE vs the glorified text editor that is Xcode 4. Just like Eclipse/IDEA do for Java, AppCode removes a lot of the shortcomings of Objective-C. For example, it generates/synthesizes/deallocs properties with one click. It has refactorings that work well. Etc.

By: Paul Richardson Tue, 08 Nov 2011 00:52:34 +0000 Eiffel anyone ??

By: MAGSHARE Mon, 07 Nov 2011 21:50:23 +0000 My first language was hex code, punched directly into memory locations, set the PC to the first one, and start the processor.

Compared to that, C was like magic.

I did twenty years with C++, and, along the way, have learned lots of languages, but the strangest was XSLT.

I now run a shop that does C++ HPC. There’s no other language that comes close, when you want raw performance. You also want good (read: expen$ive) geeks writing it. It’s not a good language for the faint of heart.

I like O-C. I got used to the bracket syntax (from SmallTalk). It’s OK.

A lot of these languages came from architects, trying to force bad programmers to write good code.

Good luck with that…

By: Benjamin Ragheb Mon, 07 Nov 2011 19:40:42 +0000 I have trouble taking seriously people who whine about the square brackets.

By: Richard Durr Mon, 07 Nov 2011 16:57:30 +0000 The interesting parts of ObjC are Smalltalk.

By: Andy Lee Mon, 07 Nov 2011 15:10:13 +0000 It’d be cool if Objective-C 3.0 could remove the square brackets and use true Smalltalk-like syntax. F-Script proves it can be done.

If it would help to give the compiler hints, the requirement could change to have just one top-level pair of square brackets enclosing any messaging statement or top-level expression:

foo = [MyGraphPoint pointWithX: xField floatValue y: yField floatValue];

[self graph plotPointAtX: foo x y: foo x];

I might have my precedence rules for Smalltalk syntax mixed up, but it would be something like this, with parens as needed for grouping. The brackets would tell the compiler, “Here comes some Smalltalk.”

Removing the brackets, which some people find ugly, would be consistent with Apple’s trend of making things easier for newcomers to the platform. I suppose there would still be people uncomfortable with Smalltalk syntax.

By: mkonutgan Mon, 07 Nov 2011 15:03:35 +0000 I too was ‘forced’ to learn C++ (and now Java) in college. Of course, I’m just a student and don’t know as much as any of you guys, but for the last two years I have been learning Ruby, C and Objective-C in my free time and doing things and writing small apps and I must say I adore Ruby for its elegance and complete object-orientedness and I find (pure) C very fun to write mainly because of its simplicity and because of my fascination for the low-level. I find Objective-C also very nice, with advantages of both, though I haven’t used it that much and I prefer it to C++ or Java.
Now macruby sounds interesting, but I’m worried about how long and how much Apple will actually back it up.

By: Charlie @ Mon, 07 Nov 2011 14:45:55 +0000 [I too_can_not_stand: [the nested_bracket: [syntax: sorry]]]

I find it practically violent.

…I do the bulk of my programming C# and prefer it in many ways.

By: Tim Bartle Mon, 07 Nov 2011 13:44:41 +0000 Just for the record, Objective C was not “Apple’s response to object-oriented programming” – Objective C was developed several years before NeXT or Apple started using it by Brad Cox and Tom Love.