Something like ADL from C++?
Timon Gehr
timon.gehr at gmx.ch
Fri Dec 13 03:49:46 UTC 2024
On 12/12/24 07:07, Walter Bright wrote:
> On 12/3/2024 6:51 PM, Timon Gehr wrote:
>> I dislike function-local import semantics quite a bit as they do not
>> follow the well-thought-out overloading rules that apply to other
>> imports.
>
> I don't know if anyone remembers, but there was a huge debate about this
> in the early days. I had implemented local import rules just like all
> the other rules, but everyone else deemed that unintuitive, and so we
> now have a difficult to explain mechanism that is intuitive.
>
I don't think I was around for that, but to be fair, it is unlikely that
we are on exactly the same page here. There are multiple ways to do this
that avoid hijacking problems and you have vehemently argued against
overloading at function scope in the past.
More information about the Digitalmars-d
mailing list