Talk:Apply a callback to an array: Difference between revisions

→‎array vs list: Are tasks overspecified, or underspecified?
m ((I really need to sign these...))
(→‎array vs list: Are tasks overspecified, or underspecified?)
Line 10:
 
::TCL is almost-functional (it steals a lot from LISP). I'll put an example for either in there. A list is just what the name implies -- essentially what would be called a one-dimensional array in many other languages. It is the natural storage container for a bunch of data in TCL (and indeed was the only data structure for a long time). In TCL, at least, the notion of an "array" strictly implies an <i>associate</i> array. I.e. looping over a list means looping over the elements of the list (and doing something with them), but looping over an array means looping over the <i>keys</i> of the array (and doing something with the elements associated with those keys). [[User:Sgeier|Sgeier]] 18:28, 1 February 2007 (EST)
 
:::I still struggle with this differentiation, and what it may imply when providing examples in [[J]], which is one of the languages where "a list" means "an array of one axis (or dimension)". If "list" means a unit of data that lacks any key-reference aspect, then perhaps tasks that specify use of lists should not be completed using J? --[[User:TBH|TBH]] 16:36, 15 January 2008 (MST)
Anonymous user