3 ms·
> I think it's still better than what you get with C++ and Python. I would much rather have a relatively inscrutable <+> operator that does something vaguely li
by mercurial 14y ago
> I think it's still better than what you get with C++ and Python. I would much rather have a relatively inscrutable <+> operator that does something vaguely like addition than having + do multiple completely different things on different types.
I can live with + as a concatenation operator for strings, but in general, if you're starting to implement custom operators for +, you should only do this for things which are numbers, and which can also support -, / and *.
Wrt to Arrow, you could still have your custom operator but with a human-readable name:
actionA >next> some complicated action >next> actionB
or alternatively:
actionA `next` some complicated action `next` actionB
Sure, it's a bit more verbose, but it makes for more readable code (IMO). I think it's not so much the notion of custom operators I object to than the "let's get wild with non-AZERTY characters" philosophy.
Of course, it doesn't mean that human-readable names are always better... I'm looking at you, "return".