On Wed, Jun 23, 2021 at 6:13 AM Soni L.
Think about it like this, extension methods give you the ability to make imported functions that look like this:
foo(bar, baz)
look like this instead:
bar.foo(baz)
That's all there is to them. They're just a lie to change how you read/write the code. Some languages have an whole operator that has a similar function, where something like bar->foo(baz) is sugar for foo(bar, baz). The OP doesn't specify any particular mechanism for extension methods, so e.g. making the dot operator be implemented by a local function in the module, which delegates to the current attribute lookup mechanism by default, would be perfectly acceptable. It's like deprecating the existing dot operator and introducing a completely different one that has nothing to do with attribute lookup!
uh... I'm lost. Are you saying that that's a good thing? You *want* to replace the existing dot operator with one that has nothing to do with attribute lookup?? I don't get it. ChrisA