On Monday, 29 August 2016 at 12:53:26 UTC, Jesper Tholstrup wrote:
On Sunday, 28 August 2016 at 05:21:03 UTC, Tofu Ninja wrote:
Are unicode function names not supported in dmd?
bool ∩(A, B)(A a, B b){
return intersect(a, b);
}
Error: character 0x2229 is not a valid token
Personally, I would prefer 'intersect' as a function name over
'∩' anytime.
Which benifits does the symbols add?
It's concise and has a very specific meaning. If one is working
with mathematical objects and set up correctly then it can be
more easily interpreted because it is `inline` with standard
mathematical syntax.
It's the same reason mathematicians prefer ∩ over intersect. You
would prefer it too if you got used to it. The whole point of
symbols is to simplify, ∩ is more simple than intersect as the
first requires 1 symbol and the second requires 8 symbols.