Hi Folks, Pardon the noobish "eyes of wonder" on the following. Recently, Eliot asked...
The result is:
This shows that the stuff in an Array is evaluated BEFORE the array is "produced". This is NOT in the Terse Guide and I do not recall seeing it in the books I read when I first started Squeak. It is a very handy tool. I guess the behavior makes sense, as an Array is not a Block . Also, putting the same stuff in an OrderedCollection gives the same behavior.
The construct is very reminiscent of on of the early lessons in the SICP series, Anyhoo, one more cool thing to add to the toolbox. cheers. |
Hi Timothy, On Sat, Oct 24, 2020 at 3:32 AM gettimothy via Squeak-dev <[hidden email]> wrote:
These are called Array Tuples, and Dan Ingalls added them to Squeak many years ago. They are lovely concise forms, way more convenient than Array with: with: with: ... and not limited in size. Since Dan adding them several dialects have followed suit. Alas we've yet to see a new edition of the Blue Book to mention these and other great improvements (e.g. ByteArray literals, Vassili Bykov's ifNil:ifNotNil:, closures) although I do dream of doing a revised blue book with a modern VM specification in the last section. And I'd love to see a Red Book on the Squeak tools. Monticello is, for example, very beautiful, and should be more widely praised, used, and documented.
It should be :-)
_,,,^..^,,,_ best, Eliot |
Thanks Eliot When Roassal3 side project is done, my attention turns to either porting Pillar, or , more likeky, writing our own markdown parser with XTreams grammar and various actor backends to duplicate the Pillar output (including HelpBrowser, xhtml, latex, morse code...) What I see being different is the source document living entirely within squeak classes, and storeable, distributable via monticello, with git being a secondary source of input to the monticello. Ergo, any squeak user can contribute by editing simple markup, or modifying existing templates. The Array example is in my list of things to cover . So, suppose a couple of booklets exist covering Common Patterns and Idioms, Cool Code Snippets, Arrays, etc... A query to the in image documents for 'Array' will show those titles, edit and save in place, view in place, save via monticello, voila, every image has the documentation. Squeak does not have a documentation problem, it has a documentation aggregation problem. Cheers |
Free forum by Nabble | Edit this page |