Re: [MathML4] Removal of the menclose notation "radical"

Le 26/07/2016 à 14:06, Stephen Watt a écrit :
> I don't see why there would be inconsistencies in implementation.   A
> reasonable developer would just have <msqrt> call the same code as
> <menclose notation="radical">.     
It depends what you mean by "call the same code". Also note that mroot
has similar layout but some differences (more parameters for the index,
only two children and no inferred mrow).

In WebKit, msqrt & mroot share the same C++ class. In the past, the code
of msqrt was reused for menclose by creating anonymous nodes which
caused complaints from Google at the time they review it and will make
things even worse now that they are moving to stricter rules for their
layout classes. Fortunately menclose@notation was removed so it's no
longer an issue.

In Gecko, msqrt & menclose share the same C++ class. At the moment it
does not share code with mroot so there are duplicate logic which may
lead to potential inconsistencies.

Personally, I would say it's best to share msqrt / mroot implementations
as they have clear and simple rules to perform the layout. menclose has
many notations, must handle multiple notations at the same time and is
more complex, so merging it into msqrt (as done is Gecko) makes the code
less readable.

Frédéric

PS: Some developers will be happy to know that they are "unreasonable":
https://github.com/mathjax/MathJax/issues/101

Received on Tuesday, 26 July 2016 13:25:38 UTC