RFC: Can DefaultSignature compile-time conditional APIs be regarded "benign"?

Herbert Valerio Riedel hvr at gnu.org
Fri Dec 14 11:13:22 CET 2012


Johan Tibell <johan.tibell at gmail.com> writes:
> On Sun, Nov 11, 2012 at 11:22 AM, Bas van Dijk <v.dijk.bas at gmail.com> wrote:
>> On 11 November 2012 15:34, Herbert Valerio Riedel <hvr at gnu.org> wrote:
>>> I'd argue that there is no harm in allowing this kind of compile-time
>>> conditional APIs using the DefaultSignature language extension.
>>
>> I agree.
>>
>> There's one minor issue: Say some client does not intend to rely on
>> DefaultSignatures but forgets to write a definition for the method. He
>> will then not get a "No explicit method or default declaration"
>> warning. However, in this case I think the benefits outweigh this
>> disadvantage.
>>
>> FWIW I prefer that deepseq and hashable both use the DefaultSignatures
>> extension to provide generic default definitions.
>
> hashable won't be using DefaultSignatures. See the discussion here:
>
> https://github.com/tibbe/hashable/pull/33

Update: However, starting with hashable-1.2.0.0 DefaultSignatures are
        being used notwithstanding :-)

cheers,
hvr



More information about the Libraries mailing list