[sc34wg3] CTM / TMCL Issue: Wildcards - Do we need them?

Lars Heuer heuer at semagia.com
Tue May 27 08:53:54 EDT 2008


Hi Robert,

[...]
> Given the many ... edges ... CTM has saving on the wildcards does not
> really make a difference. From an implementation viewpoint both are
> no-brainers.

Right, but I think they may not be no-brainers for (some) users.

    def tpl($t, $t2, $name)
        $t - $name.
        $t2 - $name.
    end

    tpl(?foo, ?foo, "name")

What can the user expect here? Some may think ?foo, ?foo creates two
different foo's since ?foo may be seen as a kind of constructor (OOP)
and the user may assume that she deals with two different ?foo's here
which is not the case.

In fact, just one topic with one name is created above.

Here:

    def tpl($t, $t2, $name)
        $t - $name.
        $t2 - $name.
        ?foo - $name.
    end

    tpl(?foo, ?foo, "name")

You get two topics with the same name since the ?foo *in* the template
is another ?foo than the ?foo in the "global" scope.

If we reduce the possibilities to [] we'd ensure that
1. The semantics are clear: A topic is created in any case
2. That the user assigns some characteristics to the topic (like a
   name, occurrence, template invocations)
   (We do not get topics with just an autogenerated iid).

further (not so important maybe):
3. Spec. is simplified
4. Implementations can be simplified (don't worry about the scope of
   the named wildcards).
   
Best regards,
Lars
-- 
Semagia 
<http://www.semagia.com>



More information about the sc34wg3 mailing list