Re: shared-text substrings Dan Bornstein (07 Feb 2000 19:59 UTC)
Re: shared-text substrings Mike Wilson (08 Feb 2000 17:34 UTC)
Re: shared-text substrings Shriram Krishnamurthi (08 Feb 2000 17:46 UTC)
Re: shared-text substrings Per Bothner (08 Feb 2000 18:06 UTC)
Re: shared-text substrings Shriram Krishnamurthi (08 Feb 2000 18:16 UTC)
Re: shared-text substrings Per Bothner (08 Feb 2000 19:11 UTC)
Re: shared-text substrings Shriram Krishnamurthi (08 Feb 2000 20:41 UTC)

Re: shared-text substrings Per Bothner 08 Feb 2000 19:11 UTC

Shriram Krishnamurthi <xxxxxx@cs.rice.edu> writes:

> Keywords in your implementation are wholly unnecesary.  This is a data
> language, not a procedure call context.  The XML collection could just
> as well have used the syntax you propose, or indeed many others.

Even in this context of pure data (as opposed to procedure calls),
builtin keyword support has teh advantage that keywords are
self-evaluating, and they are distinct from normal symbols.  When you
use the `NAME:' syntax they also have a nice read/-print-syntax that
is natural for specifying name-value pairs.  (Languages that have
keywords may also have some mechanism that automates processing of
keyword arguments passed to procedures, but keywords can be useful
independent of that - as in my example.)

> And this is without even getting into the cost of keywords,

Keywords per se are cheap. Processing keyword parameters can
be expensive, but you only pay for it when you use it.

> indeed even their appropriateness (as a poor man's substitute for
> objects -- why bother when you have real objects?),

I don't know where this is coming from - I see keywords as completely
orthogonal to objects.  (Keywords make it nice to specify initial
attributes of objects, though.)

> PS: Now that I think about it even more, I *can't* reuse the
>     implementation of keywords built into the implementation (using,
>     say, APPLY), because the set of keywords used by the set of all
>     documents is naturally limitless, whereas keyword syntaxes use a
>     fixed set of keywords.  So keywords don't help any.

I agree a general XML-processing applications cannot take much
advantage of the keyword processing done for keyword parameters.  Thus
keywords don't help in any *fundamental* way.  Where they do help is
in the *syntax*:  They allow a more readable, more concise, less
error-prone syntax, since they don't depend on as many parentheses.
This is mainly a matter of personal preference, but I suspect the
keyword style will be more natural for most people.
--
	--Per Bothner
xxxxxx@bothner.com   http://www.bothner.com/~per/