Discussion about infix requirements

Yeah, but try doing something more complicated like Px.((sizeA + sizeB) / 2) (where (/) is (t, int) => t). Px.(add(sizeA, sizeB)->div(2)) is OK, but doesn’t quite read as a forumla.

If infixes have to conform to a certain format, like <*>, then that would help the readability IMO. I personally think that’s a good pattern in general: Height.(bill.height <+> ted.height). It makes it clear that this infix isn’t from Pervasives and that it (presumably) adds two numbers.

7 Likes

Seeing as how unrestricted infixes are not on the roadmap for V10, I’d like to know clearly if the maintainers have any intention of including them. I’ll probably bite the bullet and convert my ReasonML code to much more verbose non-infixed anyways, but it would be nice to know if we are making any progress convincing them that it is a good idea for a “smart” language.

1 Like