2 ms·
C# supports operator overloading but not custom operators. That means vectors get to use the plus operator for addition, but no Scalaesque ~~/ operators. C# is
by seanmcdirmid 8y ago
C# supports operator overloading but not custom operators. That means vectors get to use the plus operator for addition, but no Scalaesque ~~/ operators.
C# is not a language that is generally criticized for operator soup like the ones that support custom operators.
- ainar-g 8y agoCounter-examples: * C++ uses bitshift operators for IO. The (in?)famous std::cout << "hello world" << std::endl; Which is such an improvement over puts("hello world"); * Ruby on Rails components sometimes redefines `=` as a hash merge. E.g. this config.action_mailer.default_options = {from: 'no-reply@example.com'} actually adds `from` to the default options instead of overriding it completely.
- btilly 8y agoC# may not be generally criticized for that. But there are certainly C# code bases that do get so criticized.