A few unordered remarks:
Personally I don't mind lots of backslashes after I got used to them in the formbuilder (I remember Jerry even mentioning an emacs trick to get them automatically but I never found out exactly), but I don't have anything against the second form either, except for the fact that you can't insert tcl comments. I wonder if it would be possible to get Dan's hack into this, but it's definitely a minor issue.
How would an implementation of a service contract look like? What about an extension to ad_form, so that I can simply write it like this:
ad_proc -public -implements workflow::sc::role_default_assignee::GetPrettyName my_pretty_name_proc {
...
return $result
}
Furthermore I think making at least -inputspec the same format as the args list of ad_proc would make it clearer:
GetAssignees {
operation_desc "Get the assignees as a Tcl list of party_ids, of the default assignees for this case, object, role"
inputspec {case_id:integer
object_id:integer
role_id:integer}
outputspec {party_ids:integer,multiple}
nargs 3
iscachable_p "f"
}
No reason not to do the same for outputspec actually.
It's great that you are picking this up, thanks! This will make service contracts much more feasible to understand and write.