[bitc-dev] Issues for s-block surface syntax
Jonathan S. Shapiro
shap at eros-os.com
Thu Jan 24 09:09:57 EST 2008
On Wed, 2008-01-23 at 17:38 -0500, Kevin Reid wrote:
> I think what I would do to support human auditing is allow infix
> operators, but prohibit precedence and associativity; that is,
> parentheses must be used around any operand of an infix operator
> which is itself an infix operation.
A slightly less draconian solution would be to declare that user-defined
infix operators always have the highest precedence, and require
parenthesization only when disambiguation is required.
This would reduce the problem significantly. The question is: how
pragmatically useful would this be?
In practice, I observe that there seem to be a relatively small number
of infix operators that people seem to want to introduce. If we can
generate a vaguely sane set of these, I don't see a problem with
predefining the operators into the precedence table and predefining a
set of type classes to go with them.
shap
More information about the bitc-dev
mailing list