Date: Mon, 5 Jan 2026 15:20:05 +0100
pon., 5 sty 2026 o 14:54 Jan Schultke <janschultke_at_[hidden]> napisaĆ(a):
>>
>> Or simply define `foo(.Type{X})` as "Find `Type` using ADL based on `foo`"
>>
>> And then add options for generic proxies to use it too, like:
>>
>> ```
>> void proxy(auto y) uses_namespace_of(my_lib::foo)
>> {
>> my_lib::foo(y);
>> }
>>
>> proxy(.Type{1}); // find `my_lib::Type`
>> ```
>>
>> Only problem would be if you had two `foo` from diffrent namespaces
>> and both could find some `Type` based on ADL.
>
>
> The whole strong type stuff feels like piling several layers of complicated machinery on top of what is a very simple feature in languages, typically. At work, I literally just wrote some Kotlin a minute ago:
>
>> haystack.contains(it, ignoreCase = true)
>
>
> Is it really too much to ask to have a simple mechanism that lets you pass values of fundamental type instead of adding a layer of proxy types and ADL? If you're going to create types for each parameter anyway, then adding a new core language feature just so you can write .Type{1} instead of ns::Type{1} is probably not worth the effort.
>
I only explore "design space", some solutions are "better" but could
have blocker that make them impossible.
>>
>> Or simply define `foo(.Type{X})` as "Find `Type` using ADL based on `foo`"
>>
>> And then add options for generic proxies to use it too, like:
>>
>> ```
>> void proxy(auto y) uses_namespace_of(my_lib::foo)
>> {
>> my_lib::foo(y);
>> }
>>
>> proxy(.Type{1}); // find `my_lib::Type`
>> ```
>>
>> Only problem would be if you had two `foo` from diffrent namespaces
>> and both could find some `Type` based on ADL.
>
>
> The whole strong type stuff feels like piling several layers of complicated machinery on top of what is a very simple feature in languages, typically. At work, I literally just wrote some Kotlin a minute ago:
>
>> haystack.contains(it, ignoreCase = true)
>
>
> Is it really too much to ask to have a simple mechanism that lets you pass values of fundamental type instead of adding a layer of proxy types and ADL? If you're going to create types for each parameter anyway, then adding a new core language feature just so you can write .Type{1} instead of ns::Type{1} is probably not worth the effort.
>
I only explore "design space", some solutions are "better" but could
have blocker that make them impossible.
Received on 2026-01-05 14:20:19
