Ralf Hemmecke wrote:
>
> Dear Waldek,
>
> would it make sense to you to treat identifiers like +, -, *, etc. in a
> special way, if they appear in signature definition places like
>
> MField: Category == MRing with
> /: (%, %) -> %
>
> ? Or in fact if they appear in a place where an identifier is expected.
>
> The form (+) should count as the prefix form, i.e. (+)(a,b) = a+b.
It would make some sense. But the question is if this problem is
important enough to introduce irregularity. AFAICS operators are
expected to appear in categories, actually in small number of
categories. Given limited number of operators I am not sure
if they need special support.
Support of "prefix use" of operators is separate issue.
Significant problem is possibility of misparsing an expression
due to a typo -- so change would require consideration if
increase in convenience is worth decreased capability of
detecting syntax errors.
> Wouldn't that be similar to the current special treatment of 0 and 1,
> which also don't have to be prepended by an underscore?
No. For parser 0 and 1 are regular numbers. Only later parts
treat them as identifiers.
--
Waldek Hebisch
[email protected]
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.