The future of UDAs.
Max Samukha
maxsamukha at gmail.com
Thu Nov 29 11:35:58 PST 2012
On Thursday, 29 November 2012 at 17:35:43 UTC, Andrei
Alexandrescu wrote:
> On 11/29/12 12:07 PM, Max Samukha wrote:
>> On Thursday, 29 November 2012 at 15:23:32 UTC, Andrei
>> Alexandrescu wrote:
>>> On 11/29/12 10:17 AM, Max Samukha wrote:
>>>> On Thursday, 29 November 2012 at 14:17:40 UTC, Andrei
>>>> Alexandrescu
>>>> wrote:
>>>>>
>>>>> I think this entire approach is unprincipled (aside from
>>>>> solving a
>>>>> problem that's not urgent and not important).
>>>>
>>>> Could you explain how did you determine its urgency and
>>>> importance
>>>> please?
>>>
>>> We have solved instances of the problem in the standard
>>> library.
>>> Please no more trick questions, thanks.
>>
>> The standard library does not represent the bulk of D code.
>> Requirements
>> for client code are different from those for the standard
>> library.
>> Please don't base your opinion of importance exclusively on the
>> experience of a limited group of D users.
>
> There are plenty of patterns for solving order of
> initialization issues in libraries, known since time
> immemorial. Requiring a library initialization call would be
> the simplest (albeit not the most elegant). The Monostate and
> Singleton patterns also come to mind.
We know about singleton/monostate, and it is the initialization
call that we want to avoid. If the patterns worked for us we'd
use them.
Elegance is important. We came to D for it. Otherwise, we would
stick to the inelegance of other languages. D gave us an
opportunity to use something better but that something tends to
break just before the homestretch.
>
> This is just not something that has no solution. Better
> solutions are always welcome, but keeping a baseline is always
> useful.
>
>
> Andrei
More information about the Digitalmars-d
mailing list