[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Static ambiguities: test-end and test-apply



In general, I don't care as much about the order of arguments, but I do
find it's better to ascertain the meaning of an invocation with no more
work than counting the number of arguments (i.e., not having to examine
the type of the arguments).

In the current spec, test-end is ambiguous:

  (test-end [name] [count])

as is test-apply:

  (test-apply [runner] specifier ... thunk)

I'd suggest revisiting these forms.


In fact, the reference implementation already implements:

  (test-end [name [count]])

which is fine by me.


Furthermore, if test-apply were made to require the runner (the user could
supply (test-runner-current) if needed), this would also solve the
"implicit runner" problem (*).


(*) The "implicit runner" problem:  there are currently two forms which
can implicitly create a runner: test-begin and test-apply.  It's obvious
how to "finalize" (bring about the invocation of the on-final hook) one
created by test-begin, but it's less clear how that should happen for
test-apply.  In fact, this is a real problem for my current
implementation!

-- 
-- Donovan Kolbly                    (  d.kolbly@xxxxxxxxxxx
				     (  http://www.rscheme.org/~donovan/