Thread overview
[Issue 22119] [Functions] Function Overloading clarity for int[] and strings
Jul 20, 2021
mhh
Aug 02, 2021
anonymous4
Dec 17, 2022
Iain Buclaw
July 20, 2021
https://issues.dlang.org/show_bug.cgi?id=22119

mhh <maxhaton@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maxhaton@gmail.com

--- Comment #1 from mhh <maxhaton@gmail.com> ---
Is this not implied by the existing overload matching rules?

--
July 30, 2021
https://issues.dlang.org/show_bug.cgi?id=22119

--- Comment #2 from crazymonkyyy@gmail.com ---
(In reply to mhh from comment #1)
> Is this not implied by the existing overload matching rules?

You were part of the conversation on discord and didnt see it either?
its implied if I understand the rules, but unclear.
the implicit int to char and char[] being close enough to strings was very
surprising given a foo(intT)(intT[3]) and foo(string) overloads

--
August 02, 2021
https://issues.dlang.org/show_bug.cgi?id=22119

--- Comment #3 from anonymous4 <dfj1esp02@sneakemail.com> ---
A more meaningful example:
---
struct Address
{
        this(in char[] host, int port){}
        this(ubyte[4] ip, int port){}
}

auto addr=Address([127,0,0,1],80);
---

I wanted overloads for host name and ip address, but they are ambiguous.

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=22119

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4

--