We didn't develop it further as there were unforeseen interactions where `p != 
nil` would be rewritten to `p[] != nil` or `p != q` to `p[] != q[]` but tbh I 
don't remember the details.

This feature needs to be re-designed. Here is my current proposal:

"If overloading resolution in a call using the syntax `a.b` or `a.b(X)` 
produces no matching candidate for `b`, the expression is rewritten to `a[].b` 
(or `a[].b()`) and overloading resolution is tried once again"

This rule seem to be more consistent with what Nim does for field access and 
seems to avoid weird feature interaction. If the rule allows for custom 
overloaded deref operators it would also improve custom smart pointers because 
these can then be written without `converter` which is an unloved feature of 
Nim. Will write an RFC. 

Reply via email to