Documentation, Chapter 22 ... Huh? Help Me Understand Please

This is a general issue with programming language texts… there are these complicated, powerful constructs with just some little trivial example demonstrating their usage, and you’re left with no clear idea of why and when you’d use such a thing (…until maybe you have a lot of practice with a lot of languages and recognize the shape of the thing and have experience with when it’s used.) And that’s because for these complicated, powerful constructs, a substantial example could take 30 pages to explicate and programming language texts have a lot of ground to cover.

This construct doesn’t seem to have been used widely. I’d been going to cite Dannii’s Benchmarking… grepping through my collection of I7 source, outside of the Standard Rules I’m only seeing Benchmarking, Scope Caching, Constraint Solver, Glimmr Canvas Animation, and Scroll Thief. That last demonstrates one interesting possibility:

Table of Spell Durations
subject (an object)	enchantment (a spell)	duration (a number)	end effect (a phrase object -> nothing)

A table column can hold phrases, giving a relatively quick and easy way to specify distinct complex behavior for some other thing. Multiple things could have the same end effect phrase, and the phrase for a given thing could be re-assigned during play.

That could let you do things that could be really hairy and involve lots of conditionals to try to do otherwise.

2 Likes