About Bug 1742275: featurep(false, 'complex)



> > 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". 

Having two different functions for this seems like a very good
idea to me. I guess declaredp(S,P) would be straigt forward.
I wonder how propertyp(E,P) would look like, but at least it should
honor the declarations instead of wildly adopting assumptions from
other parts of maxima.

Ideally I'd also like to see some possibility to specify the defaults
for undeclared symbols and some uniform way to query this information.
Right now we have the variable "domain", but it isn't used enough.

Perhaps the querying part could be done by propertyp(S,P)? 
I.e. propertyp(S,P) := declaredp(S,P) or isdefault(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).

Well, currently featurep(..., 'complex) always returns true. Any code
depending on this is already broken by design.

About featurep(..., 'real) I'm not that sure. rgrep says this isn't
used in src nor share. Also the behavior is sufficiently awkward, that I
don't think any user code ever got it right, so I'd think that this
change might actually improve user code. But OTOH I'm not very 
attached to fixing deprecated functions. :)

HTH,
Harald