6

"Does river direction make waterflow go downwards?"

Originally I selected it just to copypaste the "does effect support cause?" formulation, but as I selected, it unrolled the answer, and... oh...

Comments
  • 5
    Except the answer is incorrect as C# supports operator overloading, at least since 4 years or more.

    https://docs.microsoft.com/en-us/...
  • 1
    @Voxera read more carefully

    The answer doesn't say that operator overloading isn't possible, only that overriding them isn't supported
  • 0
    @Krokoklemme Ah, never considered the difference :)
  • 0
    In Soviet Russia..
  • 0
    @Voxera Overriding != Overloading
  • 0
    @hashedram sure, just never could considered it with operators, never even heard of overriding them in any language.

    I use override of virtual methods.

    But when thinking operators I just got sidetracked to overloading ;)

    Is there any language where overriding operators is possible?
  • 0
    @Voxera Yea C++ can. Like say in a graphics library, you want to convert one class into another, like a point into a circle with the point as center..

    You can override the = operator and do

    Circle X = Point Y

    Equal operator gets overridden a lot if you define your own class and want to convert some other class into it easily.
Add Comment