Skip to content

Nicer infix operators? #262

@kindaro

Description

@kindaro

I know there is a strong sentiment in the Haskell community towards legacy support, backwards compatibility and so on, and I am prepared to discover that this is a "wontfix", but I would like to express my vote anyway.

  1. HUnit has operators @?= and @=?. I propose we change them to ?= and =? — it would be so much more readable and intuitive. (Which side the question, the same side the value being checked.) Hoogle does report a couple of packages using these names, but I claim that a test engine is used far more widely (ideally, in every package) and so it is fair to have the shorter names.

  2. Let us redefine QuickCheck.=== to mean extrinsic equality for functions: f === g = \x -> f x == g x. Properties are quite often expressed as equality of functions anyway — think of the laws of any standard class.

Consider that any function benefits from an example and, better, a property too. So these operators might be used more often than any other function at all, and every small nuisance is magnified.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions