adda/co/comparing tasks to types:
. how is a task like a class?
do they both use < ... >? [3.4: .... yes]
. records and tasks can both be anonymous types:
x`= y; -- y is an anonymous type .
x.mytasktype; y.co<...> .
. the name: "(task type) says it all:
it's just a type but with
the added dimension of concurrency .
. a type defines an interface,
an instance defines an object that is
following its type's interface,
and the instance implicitely belongs
to some particular process .
. in the case of a task object,
it is its own process .
. conversely, non-task types can have
all the same appearance internally
as a task does:
because, they can handle messages async'ly,
so, instead of being called,
they can be accepting order records,
then they can prioritize the order records,
according to who called and what they asked for .