Hi Elan,

Thank you for your comments on my posting. I'm sorry, I got so involved in
trying to explain how MAKE works, that it must have seemed I thought MAKE's
behavior was reasonable.

You wrote:

>Then let make complain that it cannot process any-string! because
>any-string! is not a "fundamental datatype"! At this point in time make
>reports that it cannot process datatypes, even though it can process
>datatypes, provided they are not pseudotypes.

I agree with you entirely that MAKE gives a misleading error message in many
cases. (BTW, exactly the same problem occurs with the new function TO.) The
proposal you have made would fix most of those cases, but it wouldn't fix
this one:

>> make op! ">>"
** Script Error: Cannot use make on datatype! value.
** Where: make op! ">>"

since op! is in no way a pseudotype. I also feel that introducing pseudotype!
as yet another datatype would complicate other aspects of describing REBOL.
You'd also need to have a new pseudotype covering both fundamental datatypes
and pseudotypes.

The trouble with MAKE here is that its behavior is so complex (that's no
news, right?). Since it interprets the TYPE argument in two ways, it would
really have to give an error message explaining that neither interpretation
was allowable. In the example above, it could say:

** Script Error: Cannot use make on op! or datatype! values.

or:

** Script Error: Cannot make op! or datatype! values.

With this error:

>> make any-string! "abcde"
** Script Error: Cannot use make on datatype! value.
** Where: make any-string! "abcde"

it could say:

** Script Error: Cannot make any-string! or datatype! values.

Many users would still be wondering why MAKE even mentioned datatype! values,
but at least they'd have a bit more of a clue as to what went wrong. Also,
one interpretation of this message would be that if you can't make any-string!
values, you can't make any of the any-string! values, such as strings, issues,
email, etc. It would probably be better if MAKE just ignored the
possibility that any-string! was intended as an example value, leaving us
with:

** Script Error: Cannot use any-string! as a datatype value with make.

Of course users still wouldn't learn why any-string! wasn't make-able,
whereas with your suggestion, given that they had the initiative to learn
what a pseudotype is, they would also get this important information.

Hmmm, what do you think?

Eric

Reply via email to