• balsoft@lemmy.ml
    link
    fedilink
    arrow-up
    15
    ·
    1 day ago

    Operator overloading is awesome in a functional language. Haskell allows for a lot of creative stuff with operators, but since they can’t have side effects, must conform to predictable types, and have specific requirements they are somewhat understandable. Idris is also very ergonomic when it comes to operators.

    C++ allowing a library to override the + operator with system("rm -rf /") is a lot less awesome.