Comment

Comment by nspragmatic

> Obj-C is only dynamically typed

> swizzling happens only once at compile time.

Objective-C is a dynamic language in every sense of the term.

As examples, at runtime, you can:

- change an existing class' superclass - swizzle methods - create a class ex nihilo (though it'd be a better idea to inherit from NSObject) - give that class (or even an existing one) methods, ivars, and properties

.. and much more

Visit the runtime reference[1] and jump into a running Objective-C app with GDB or F-Script. It's a lot of fun.

[1] https://developer.apple.com/library/mac/#documentation/Cocoa...

parent nspragmatic 14 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton