Chapter     16

Objective-C Literals

Since its inception, the Objective-C language has provided support for programming literals, notations that represent fixed values in the source code. Until recently, literal notation was confined to scalar types. In this chapter, you will learn all about one of the more recent additions to the language, Objective-C Literals, which provides support for object literals. You will learn their syntax, associated semantics, and guidelines for their usage. The chapter will also cover object subscripting, another recent addition to the language.


In computer-programming, a literal is a notation for representing a fixed value in source code. As its name implies, literal notation enables you to write, in code, ...

Get Pro Objective-C now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.