[alicebot-archcomm] topic attribute

Christopher Fahey [askrom] alicebot-archcomm@list.alicebot.org
Tue, 20 Nov 2001 00:06:01 -0500


> Would it not make a great deal more sense for the topic syntax to be:
> 
> <topic value="SOME PATTERN">
> ...
> </topic>

I agree entirely. As we've already established for <set
name="variable-name" value="value-to-set-the-variable-to">, the word
'name' is reserved for use as the name of a container, not the contents
of the container. In the case of <topic>, the tag itself is the
container and the contents of the container are the "value".

<rant>
I know it's too late (thus the rant tag) but I feel like I have to again
express that I think the use of the word "name" as the title of any AIML
attribute is going to forever confuse people. If you don't want to hear
it, just stop reading.

I took the following tag examples (some deprecated) from the AIML 1.0
table... and I wonder if every instance of the word "name" below means
the same thing, or are some "name"s different animals from other
"name"s?

     <name/> (deprecated)
     <condition name="XXX" value="YYY"> </condition>
     <get name="xxx"/> 
     <getname/> (deprecated)
     <li name="XXX" value="YYY"> 
     <set name="name"> </set>
     <set name="topic">  </set>
     <set name="XXX"> </set>
     <topic name="XXX"> </topic>
     <if name="XXX" value=YYY"> </if>

This way requires no thinking:
     <name/> (deprecated)
     <condition variable="XXX" value="YYY"> </condition>
     <get variable="xxx"/> 
     <getname/> (deprecated)
     <li variable="XXX" value="YYY"> 
     <set variable="_botname"> </set>
     <set variable="_topic"> </set>
     <set variable="XXX"> </set>
     <topic value="YYY"> </topic>
     <if variable="XXX" value=YYY"> </if>

Reasons include: 
1) Consistency between naming 'containers' and 'things that are put into
containers'.
2) The fact that the word "name" comes up in discussions of the
construction of tags and attributes so much that when we talk about
AIML, we confuse 'name' (the english word we use to generically refer to
any thing's title) with ' "name" ' (the title of a type of AIML
attribute).
3) It (apparently) can have different meanings in different tags.
4) The syntax <set name="variable-name"> looks a lot like it means "Set
the variable called 'name' to be equal to the string "variable-name". I
swear, every time I look at the <set> tag, I have to spend an extra
second or two to clear that thought out of my head. It's like we
deliberately switched our Hot Water and Cold Water faucets and we have
to remember every time we wash our hands that the handles are reversed. 
5) (I saved the best for last) When building a bot, "name" should mean
"The name of the bot". That's what most people will think. 

<superrant>
It's like AIML goes out of its way to NOT conform to normal programming
language conventions out of some theory that programming languages are
hard or intimidating for normal people to learn. But instead of making
it clearer than computer code, we just made up hip, cryptic, alternative
names for what should be straightforward concepts. What's wrong with the
word "variable" or "var"? "Predicate" is such a weird example of AIML
contortionism: every time I see that word I have to spend a second or
two to remind myself that it does not mean "the predicate of a
sentence".
Sometimes I think the cure is worse than the disease. If it aint broke
don't fix it. Etc. 
</superrant>

Out of everyone who participates regularly on this committee, I think
it's safe to say that I have the *absolute least* computer programming
experience. I'm a total amateur/dilettante, a hobbyist newbie simpleton.
Trust me when I say some of this stuff is going to confuse the heck out
of people. 
</rant>

-Cf

[christopher eli fahey]
art: http://www.graphpaper.com
science: http://www.askrom.com