December 13
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.
December 26

On Tuesday, 3 December 2024 at 22:16:26 UTC, Walter Bright wrote:

>

On 12/3/2024 7:17 AM, Max Samukha wrote:

>

// this is needed because we still cannot express "local to static foreach".

That's because static foreach will become fairly useless if it introduced a scope.

Without having read the rest of the thread: I meant Timon's __local or whatever it's morphed into since then.

>

(Same as for static if.) However, you can still add { } to make a scope:

{ static foreach(...) { } }

Or:

static foreach (...) {{ }}

That's mostly useless, indeed.

1 2 3 4 5
Next ›   Last »