Codish Lexicon
One word for one meaning, One meaning for one word,
Symmetric opposites, Comprehensive classes.
A dictionary of computer programming names.
attrs — a collection of attr for an object's attributes. is analogous to items on a dict. in javascript, attrs and items are the same except for arrays and strings. aka vars in python. aka: symbols, vars ✍
shift — to remove and return the first value of a linear collection. python: the idiom for shift in python is to pop with a position of zero. opposite: unshift, pop seuss: opposite: shoft, pish perl: [array]: remove the first element of an array, and return it† aka: array shift, dequeue, pip pertains: ordered opposite: shoft mentioned: bag, deque, list, queue ✍
unshift — to augment a linear collection in place by adding a value to the beginning, moving existing values rightward. python: the idiom for unshift in python is to use insert with a position of zero. aka: bump, propend, prepend seuss: pish perl: [array]: prepend more elements to the beginning of a list† aka: array unshift pertains: ordered opposite: push, shift mentioned: bag, deque, list ✍
symbols — a collection of symbols for a given object's attributes (attrs). is analgous to keys on a dict. see: attrs aka: dir distinct: list ✍
vars
— see: attrs python: vars([object])
attr — an attribute of an object. a setable and getable value associated with a symbol or name in an object. in some languages, attributes are either private, protected, or public. distinct: item python: property c++: member aka: member, property related: pair ✍
object — an instance of a class. see: set attr, get attr, has attr, del attr python: The most base type.† distinct: dict aka: instance, record, struct, structure ✍
items
— returns a collection of key to value items (aka duples, pairs) for a dict. python: dict: D.items()
dict
— an unordered linear collection (particularly a set) of items that expresses a relation of keys (domain) to values (range). in systems where dict inherits bag, it overrides the hash and eq attr functions. is: collection, bag attrs: keys, values, items, update, complete related: item, key, value distinct: object perl: hash seuss: a saque of items. python: dict()
javascript — mentioned: attrs, extend ✍
array — an ordered linear collection implementation that employs a region of contiguous memory where each value is stored at an index offset from the beginning of the memory region. a linear collection that provides fast random access and iteration to its values with get, set, and iter. php: create an array &dagger. related: chain interface: linear collection, ordered ✍
string — an ordered, though not sorted, collection of characters. is: linear collection seuss: text aka: word ✍
pop
— to remove and return the last value of a linear collection. seuss: shoft python: dict: D.pop(k[,d])
shoft — to remove and return the last element of a linear collection. opposite: shift, posh aka: pop perl: pop legacy: pop mentioned: deque ✍
ordered — pertains to collections that maintain the respective order of their contents. interfaces: list, queue, deque, stack attrs: push, pop, shift, unshift, first, last, begins, ends, trim left, trim right, rot left, rot right, chip, chop, erase implementations: array, chain related: sorted, unordered related: iterable ✍
| left | right |
|---|---|
| unshift | push |
| shift | pop |
| first | last |
| begins | ends |
| trim left | trim right |
| rot left | rot right |
| chip | chop |
first — returns the first element of a linear collection. is: stateless opposite: last related: pop seuss: opposite: forst pertains: ordered mentioned: chain, head, heap array, index, peek, queue, shift, tip ✍
linear — having 1 dimension. an array is a linear collection. related: scalar, planar, spatial, temporal aka: planar ✍
collection — a class of compound objects that contain and organize values. attrs: len, has, get, set, reset, getset, put, del, cut, insert, remove, discard, empty, erase classes: linear collection, planar collection, spatial collection seuss: que classes: dict related: compound ✍
pos — temporal: position. distinct: positive, abs, index, key perl: [regex]: find or set the offset for the last/next m//g search† php: alias of current() &dagger. see: index aka: position mentioned: remove, shift, time, unshift ✍
zero — returns the arithmetic identity of a class, object, or group. this is a value that when added to any value of a particular class returns the same value. for numbers, this is the value of zero (0). for any collection class, this is an empty collection. for a string, this is a null string, "". for a tuple, this is the nuple. related: unit related: add, false, sub ✍
identity:
bag — an unordered, nonunique collection that provides insert, remove, and discard as its function attributes of storage and retrieval. shift or pop are aliases for remove; push and unshift are aliases of insert. attrs: insert, remove, discard is: linear collection a sorted linear nonunique collection that provides insert and (shift or pop) as its storage and retrieval methods. seuss: bague distinct: heap aka: priority queue, pqueue distinct: set aka: sack classes: dict related: priority mentioned: adjust, baque, group, hash, saque, trie ✍
deque — an ordered linear collection that provides shift, unshift, push, and pop as its storage and retrieval functions. a deque can be implemented as a list or a regrowable, cyclic array. seuss: an ordered linear que that provides shift, shoft, pish, and posh as its storage and retrieval functions. mentioned: linear collection ✍
list
— a linear collection that provides fast put, push, pop, shift, and unshift operations. an ordered nonunique linear collection. applies to directory listing. distinct: symbols includes: queue, deque, staque python: list()
queue — a linear collection that only provides shift and push for storage and retrieval, such that the first value pushed is always the first value shifted (fifo). queues operations are often atomic, so they can be used to pass messages safely between threads or processes. aka: dequeue, enqueue distinct: signal mentioned: linear collection, list, ordered, que ✍
push — to augment a linear collection in place by adding a value to the end. opposite: pop, unshift python: append related: extend seuss: posh perl: [array]: append one or more elements to an array† aka: append, array push, enqueue related: concatenate pertains: ordered mentioned: bag, deque, list, queue, stack ✍
array unshift — see: unshift php: prepend one or more elements to the beginning of an array &dagger. ✍
in place — concept: to statefully modify an object, such that the returned object is the modified parameter or context object. mentioned: extend, push, unshift ✍
insert — to add a value to a collection. opposite: remove python: list: L.insert(index, object) insert object before index.† pertains: bag, collection distinct: put mentioned: unshift ✍
dir
— a file system directory, usually represented with the same interface as a dict. python: dir([object])
keys
— returns the keys from the domain of a dict. python: dict: D.keys()
item — a key and corresponding value. distinct: attr related: dict, pair mentioned: complete, cut, has value, hash array, items, record, set, update ✍
property
— see: attr python: property(fget=None, fset=None, fdel=None, doc=None)
set
— to assign a value for a key in an item. in math, a set is a collection of unique values that meet certain criteria. to avoid ambiguity, such collections are called bags in codish, or uniques in seuss. distinct: unique, bag pertains: collection python: set(iterable)
get
— returns the value corresponding to a key in a collection. throws a key error if no value exists for the key, or returns a default value if one is provided as the optional second parameter. pertains: collection python: dict: D.get(k[,d])
symbol — a unique key for the value of an attr on an object. symbols can be used to accelerate attribute lookup, and to provide a way to avoid name collisions for interface implementations. symbols can be integers with a non-unique string representation. aka: word mentioned: aliaser, del attr, get attr, override, polymorphism, scope, semantics, set attr, syntax ✍
©2009 Kris Kowal
Codish Lexicon by Kris Kowal is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.
