Re: Syntax noodling

On 5/12/06, Jeni Tennison <jeni@jenitennison.com> wrote:
> A copies attribute (that defaulted to 1) to indicate when a tee was
> intended would make the above an error because output1 was used twice
> rather than once. If the user really meant proc3 to use output1, they
> would add copies attributes as in: [...]

Mmmh... most languages allow you to write something like:

var output1 = f1()
var output2 = f2(output1)
var output3 = f3(output1)

Maybe in this third statement you meant f3(output2) instead of
f3(output1). But I prefer to live with the possibility of making that
mistake than having to add a "note" on certain outputs signaling my
intention to use them more than once.

And just like with regular programming languages, in most cases it
doesn't make much sense to declare an output, assign a label to that
output, and never use that label. So it seems reasonable to warn the
author of that situation (highlighting in the editor, warning when the
pipeline is processed).

Alex
-- 
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/

Received on Thursday, 18 May 2006 01:00:50 UTC