![]() Instead, the Array type is a set of opaque values - the possible objects that can have Array type - that satisfy the specifications of all the operations of Array: (indexing), length, push(), etc. So, for example, when we talk about the Array type, what we mean is not a linked list, or a block of memory, or a hash table, or any other specific data structure that might represent a sequence of values. The set of operations for a type T, along with their specifications, fully characterize what we mean by T. The essential idea here is that an abstract data type is defined by its operations. We will refer to such a method as both a producer and a mutator, but some people would prefer to just call it a mutator, reserving the term producer only for operations that do no mutation. In complicated data types, there may be an operation that is both a producer and a mutator, for example. This classification gives some useful terminology, but it’s not perfect. producers: concat, substring, toUpperCase.creators: String constructor, " quoted text" literal syntax, omCharCode static method.mutators: push, pop, shift, unshift, reverse, sort.creators: Array constructor, literal syntax, Array.of, om.observers: comparison operators =, !=,.producers: arithmetic operators +, -, *, /, **. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |