| | Sometimes called "character strings", strings represent textual data.<ref>[http://www.regular-expressions.info/tutorial.html]</ref> Computer hardware is typically not optimized for the types of operations that programmers like to do, such as concatenating or inserting, because these operations can make strings change size, requiring moving large blocks of memory around. Many ways of dealing with this problem have been devised over the last 60 years, involving efficiency vs. naturalness trade-offs. Some languages, like C and C++, permit efficient string manipulation, at a cost of programmer naturalness and understandability. Others, like LISP and Perl, permit natural use of strings at a cost of efficiency. SQL is sort of between the two. | | Sometimes called "character strings", strings represent textual data.<ref>[http://www.regular-expressions.info/tutorial.html]</ref> Computer hardware is typically not optimized for the types of operations that programmers like to do, such as concatenating or inserting, because these operations can make strings change size, requiring moving large blocks of memory around. Many ways of dealing with this problem have been devised over the last 60 years, involving efficiency vs. naturalness trade-offs. Some languages, like C and C++, permit efficient string manipulation, at a cost of programmer naturalness and understandability. Others, like LISP and Perl, permit natural use of strings at a cost of efficiency. SQL is sort of between the two. |
| − | The representation of the text is dependent upon the encoding method. For instance, a [[Unicode|Unicode-16]] string will use two bytes per ''character'', whereas a string encoded with the Ansi ([[ASCII]]) standard represents one character per byte. A [[UTF-8]] encoded string uses a variable number of bytes per character. The encoding indicates how the bits in each character translate to a specific glyph. For instance, the byte value of 65 indicates the uppercase "A" character in the Ansi and UTF-8 encoding. The maximum size of string data is language- and implementation-dependent. | + | The representation of the text is dependent upon the encoding method. For instance, a [[Unicode|Unicode-16]] string will use two bytes per ''character'', whereas a string encoded with the ANSI ([[ASCII]]) standard represents one character per byte. A [[UTF-8]] encoded string uses a variable number of bytes per character. The encoding indicates how the bits in each character translate to a specific glyph. For instance, the byte value of 65 indicates the uppercase "A" character in the Ansi and UTF-8 encoding. The maximum size of string data is language- and implementation-dependent. |
| | A pointer represents an address in memory. This allows indirection. The memory address indicated by the pointer typically contains data of a specific type. For instance, a pointer to an integer. | | A pointer represents an address in memory. This allows indirection. The memory address indicated by the pointer typically contains data of a specific type. For instance, a pointer to an integer. |
| | + | Collections represent a group of variables of the same data type. The organization of the collection depends upon the type of collection. Typical collections natively supported by programming languages include arrays, but also can include [[Tree (data structure)|trees], lists, queues, stacks, etc. Some languages provide iterators which provide a means of processing through each item in the collection. |