Joy Online Manual

Objective-C Literals

Joy extends JavaScript so you can use:

C-style character constants, like 'A' or '\n'

C-style size letters after numeric constants, like -1L or 18446744073709551615ULL

Objective-C string constants, like @"Hello world!"

C-style concatenation of string constants, such as "Error:\n" "You are a bozo." or @"Hello " @"world!"

Apple-style 4-byte character constants, like 'AETE'

Apple-style Pascal strings, like "\pString starting with length-byte"

NOTE: Joy's interpretation of 'A' or 'AETE' is different from standard JavaScript's! In Joy, writing 'A' is equivalent to writing 65, while in standard JavaScript it is equivalent to writing "A". (JavaScript makes no difference between single- and double-quoted strings; Joy will interpret single-quoted strings as char constants iff their length equals 1 or 4.)

Index