What is the reasoning behind the lack of conversions when passing parameters

Basile B. b2.temp at gmx.com
Mon Feb 5 23:23:36 UTC 2024


On Monday, 5 February 2024 at 19:16:40 UTC, Basile B. wrote:
> On Saturday, 3 February 2024 at 18:53:02 UTC, Carl Sturtivant 
> wrote:
>> [...]
>
> What D does is "implicit" overload creation. If the same name 
> already exists in the current scope it just creates an 
> "overload set", adding possible candidates in a sort of linked 
> list. There are restrictions however on what can be part of a 
> set, for example you cannot overload a function declaration 
> with an int declaration.
>
> However this becomes complicated when it's about eponymous 
> templates. There are probably still a couple of bugs related to 
> that, because the way the semantics of a D program are checked 
> does not allow to verify 100% of the time that the eponymous 
> member(s) (yes plural) are all functions.

If you like, the way sets are created is cristal-clear but the 
way a member of the set is picked is more complex ;)


More information about the Digitalmars-d mailing list