looking at /src/foundation/gclib_array_extensions.js:
- uniq: i assume it is supposed to return the array with duplicate elements
removed. i just noted the interesting side effect that if you have an
array with an element representing a function name, the uniqed array
contains a string element with that function's source code.
- $w: excuse my ignorance, but couldn't that function be defined as
String.prototype.words? if yes, what is the reason to have it as a
special function? i see that there is a String.prototype.to_words in
/src/foundation/resource.js but that seems to have other semantics.
- __compare__: does __x__ have a special meaning in Javascript? i assume
it exists to clarify it is an internal function. it only seems used by
sort_by.
- as_option_list: it feels a bit wrong to have something that generates
HTML code in here. it can probably moved somehow into LiveHTML (i
still have to scrutinise that, though)?
- dispatch/trigger: they seem to do almost the same, with the difference
that dispatch has some error handling and trigger uses the more
elegant each(). their names suggest to me that dispatch lets things
execute immediately and trigger observes a change that leads to the
execution. but i can't grasp what in the code makes them differ.
this pair is also defined in LiveHTML, but there it is a wrapper for
the functions here?
thanks,
marmorkuchen
--
_ ascii ribbon campaign .oOo. GCSd-s:+aC++ULB+++W++M+PS+++Y+
( )
X Heute die Welt, morgens das Sonnensystem!
/ \