About Bug 1742275: featurep(false, 'complex)



On 7/14/07, Harald Geyer <Harald.Geyer at gmx.at> wrote:
> Actually featurep(..., 'real) already does refer to realpart(), causing
> even worse results like:
>   featurep(x, 'real); -> false
>   featurep(x+y, 'real); -> true

This is because featurep was generalized beyond its original narrow
definition -- this is not recent, it dates back to the 1970's....

Featurep should simply mean "is symbol S declared to have property P".
When it was extended to mean "does expression E have property P", we
got crazy results like those above.  What is happening here is that
realpart assumes by default that variables are real, whether they are
declared real or not.

> If nobody objects within reasonable time, I will commit variant a)
> and comment out the call to rectform() in featurep(..., 'real).

I would like to see separate functions on the order of featurep(S,P),
meaning strictly "is symbol S declared to have property P" and
propertyp(E,P) meaning "does expression E have property P".  However,
since this distinction has not been made in the past, I would guess
that both share code and user code depend on the current definition
(whether the test suite catches this or not).  In which case, we might
want simply to deprecate featurep and replace it with declaredp(S,P)
and propertyp(E,P).

             -s