YarikTH / ureact

Functional reactive programming library for c++
Boost Software License 1.0
155 stars 10 forks source link

Consider to use or allow to use infix operators #119

Open YarikTH opened 1 year ago

YarikTH commented 1 year ago

Description

Implementation is quite small: https://github.com/boostorg/hof/blob/develop/include/boost/hof/infix.hpp https://github.com/klmr/named-operator/tree/master

Such infix operators can be as declarative and useful as existing overloaded lift operators. I don't see which infix operators can be provided by default, but adding ability to build user defined operators could be cool. Currently overloaded signal operators '<' and '>' interfere with ability to use 3rd-party libraries to make triangle brackets infix operators, so:

  1. Provide ureact specific way to make infix operators
  2. Allow some kind of customization point that allows to disable overloaded signal operators for some types (it might allow to overload binary operators '<<', '>>', '~', '|', '&' too)