> From: Devon McCormick
>
> I'm a big fan of naming things well but this particular boondoggle does
> not stir my passions either way.
>
> My feeling about the words is that a "fork" splits tasks apart but
> retains a central framework (i.e. wait for tasks to return)
> whereas "spawn" has the sense of letting offspring fend for themselves
> independently (i.e. return immediately to the parent).
>
Your feeling is opposite to the current usage in task.ijs, however as I see it
the main issue is not so much that the names aren't evocative enough,
the key problem is that the *same* name is used with conflicting definitions:
Dictionary definition of "spawn":
2!:1 The list y is executed by the host system, but yields '' without waiting
for the host to finish.
tasks.ijs definition of "spawn" for Unix:
2!:0...@] Get stdout of task. (i.e. run list y until it finishes and then
return stdout).
In fact the task.ijs definition of "spawn" is essentially equivalent to the
Dictionary definition of "host":
Dictionary definition of host:
2!:0 The list y is executed by the host system, and the result is returned.
If there is agreement that this conflict should be resolved ... ?
... then the question is how best to do so.
That involves balancing :
- the "ideal" names
(consider common meanings/usage of names on Windows/Linux/J as well as
exact matching of Dictionary and script names)
- practical impact of name changes
(how entrenched is current usage of the script verbs, how much code will
be affected, how easy is it to change).
Proposals for resolving the conflict suggested so far include:
== A ==
Change the name of 2!:1 in the dictionary to "fork"
== B ==
Create "host" as alias for "spawn" in tasks.ijs.
Deprecate "spawn" with the aim of removing it eventually.
== C ==
Rename verbs in tasks.ijs to match dictionary
"spawn" --> "host"
"fork" --> "spawn"
== D ==
???
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm