Flutterby™! : Objective-C hidden features

Next unread comment / Catchup all unread comments User Account Info | Logout | XML/Pilot/etc versions | Long version (with comments) | Weblog archives | Site Map | | Browse Topics

Objective-C hidden features

2014-03-14 19:29:39.382311+01 by Dan Lyke 2 comments

I don't need to duck into iOS or Objective-C that often, but Stack Overflow: Hidden features of Objective-C looks like fascinating reading.

comments in ascending chronological order (reverse):

#Comment Re: made: 2014-03-14 23:54:00.639028+01 by: markd

It's a pretty out of date list. +poseAsClass got removed in the new Objective-C runtime a long time ago. Isa twiddling has become verboten in the iOS 64-bit runtime (thanks to the non-pointer isa - http://www.sealiesoftware.com/...bjc_explain_Non-pointer_isa.html - kind of a cool set of optimizations given all the extra address bits lying around). And some of the techniques that used to be pretty easy (like faking multiple inheritance with forwardInvocation:) are now more tedious than useful given the somewhat stricter compiler we have today.

If you're interested in Objective-C runtime canoodling, I have a seven-parter over at the Big Nerd Ranch blog. http://blog.bignerdranch.com/2...racket-part-1-open-for-business/

And pretty much anything by Mike Ash (distinct from the regular-expression Mike Ash) is worth reading, such as his objc topics. Here's his ObjC jazz https://www.mikeash.com/pyblog/?tag=objectivec

#Comment Re: made: 2014-03-15 01:01:11.904412+01 by: Dan Lyke

Cool! Thanks!

I don't have particular applications for the class posing stuff (and it sucks that it's been deprecated, because I like places where I can only write code once), but the one thing I did like about Objective-C was that I could easily add members to existing classes without subclassing.

Of course my strategy generally is "get it into a generic environment ASAP and then write cross-platform", so usually it's either getting standard widget messages into my core controller, or gimme a canvas and let me draw on it and send me mouse events.

Comment policy

We will not edit your comments. However, we may delete your comments, or cause them to be hidden behind another link, if we feel they detract from the conversation. Commercial plugs are fine, if they are relevant to the conversation, and if you don't try to pretend to be a consumer. Annoying endorsements will be deleted if you're lucky, if you're not a whole bunch of people smarter and more articulate than you will ridicule you, and we will leave such ridicule in place.


Flutterby™ is a trademark claimed by

Dan Lyke
for the web publications at www.flutterby.com and www.flutterby.net.