What makes Scala's operator overloading “good”, but C++'s “bad”?

后端 未结 14 2083
悲哀的现实
悲哀的现实 2020-12-12 11:20

Operator overloading in C++ is considered by many to be A Bad Thing(tm), and a mistake not to be repeated in newer languages. Certainly, it was one feature specifically drop

14条回答
  •  不思量自难忘°
    2020-12-12 12:01

    I have never seen an article claiming that C++'s operator overloading is bad.

    User-definable operators permit an easier higher level of expressivity and usability for users of the language.

提交回复
热议问题