News for hackers. Stuff that matters.
Re:A routine gem update ended up creating $73k worth of subs... by zestyping on Saturday January 08, 2022 @03:22AM (#29849770)
And another:

4. Don't design an API that mixes fluent style (methods are like infix operators) with conventional style (methods are like prefix operators).

Fluent methods should never take multiple operands. It's a terrible, horrible, no-good, very bad idea.

Re:A routine gem update ended up creating $73k worth of subs... by flubflub on Saturday January 08, 2022 @07:48AM (#29851182)
I think the default should be named prefix operators. Then you can have infix operators that are aliases.

This is a problem in Haskell with infix operators being directly defined I would argue.

I disagree that infix and prefix should not be mixed. Although there is a special hell for people who use + with non-commutative operators.

Re:A routine gem update ended up creating $73k worth of subs... by zestyping on Thursday January 13, 2022 @07:09AM (#29919855)
Infix operators are fine. But _methods_ that masquerade as infix operators shouldn't mix with methods that work like prefix operators.