M2
M2 copied to clipboard
Precedence of subscripts and superscripts
There's a comment in HyperplaneArrangements which I think we should fix by changing the precedence of _ and ^:
Flat ^ Flat := Flat => meet -- ooh, cool. But note L_1^L_2 isn't L_1^(L_2) !
-- Initially this issue was the following, but I switched it because I think the above is much more important.
joinfor posets is calledposetJoin, but would be more intuitive ifjoinwas available as a method. Similarly, flats inHyperplaneArrangementshavemeet(or^) andvee(or|) rather thanjoin.
Yes, I think it would make sense if _ and friends had higher precedence than ^ and friends. Subscripting having higher precedence than exponentiation seems to be common in other languages -- I checked R, Python, and Javascript.