On Friday, 4 March 2016 at 01:56:34 UTC, user001 wrote:
"dot". For mathematical purposes it is a lot easier to understand "dot(a, b)" than "a.dot(b)", at least in my opinion.

Why don't you just define it as "dot(a,b)" to begin with?

I think it would be better idea to just add the ability to add unicode operators, and to avoid precedence issues one could just require them to use parentheses. That way you could define opCustom"•" and use it as:

( point1 • point2 )

An often stated golden rule in language design is that there should be one way to do something. When you break that rule it often is due to a language design deficiency. UFCS in both D and C++ are hacks. IMO that makes things more confusing, not more clear.

Reply via email to