August 27, 2013
On Tuesday, 27 August 2013 at 13:35:36 UTC, Dmitry Olshansky wrote:
> 27-Aug-2013 17:33, Dmitry Olshansky пишет:
>> 27-Aug-2013 11:45, monarch_dodra пишет:
>>> Koenig lookup in C++ ( also known as
>>> http://en.wikipedia.org/wiki/Argument-dependent_name_lookup ), is
>>> a mechanism that alows functions (in particular templates) to
>>> call a function that operates on an object of a specific
>>> namespace, without having to qualify the namespace  ...
>>
>> ADL has a "bug of surprise" written all over it.
>
> *Bag.. though hardly a typo )
>
>> It doesn't work all
>> that well in C++ to being with. Even after all these years:
>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2103.pdf

Well, I don't expect we'd actually change the way things are done *now*, and for all the "bugs" ADL had, it also allowed for some very powerful and *extendable* generic programming.

D has a way of doing things that C++ can, but usually, with a twist that makes it safer and/or more powerful, or with some very well thought mechanics.

In this case, it really feels as if the whole a host of functionality is just both supported, *and* with no workarounds :/

If we don't have ADL I kind of like the notion of "forced import infection" though...
August 27, 2013
On Tuesday, 27 August 2013 at 13:51:51 UTC, monarch_dodra wrote:
> D has a way of doing things that C++ can, but usually, with a twist that makes it safer and/or more powerful, or with some very well thought mechanics.
>
> In this case, it really feels as if the whole a host of functionality is just both supported, *and* with no workarounds :/
>
> If we don't have ADL I kind of like the notion of "forced import infection" though...

What do you mean by that ? Being able to force feed an import in a template instantiation ? That'd be great, because of UFCS.
August 27, 2013
On Tuesday, 27 August 2013 at 15:10:45 UTC, deadalnix wrote:
> On Tuesday, 27 August 2013 at 13:51:51 UTC, monarch_dodra wrote:
>> D has a way of doing things that C++ can, but usually, with a twist that makes it safer and/or more powerful, or with some very well thought mechanics.
>>
>> In this case, it really feels as if the whole a host of functionality is just both supported, *and* with no workarounds :/
>>
>> If we don't have ADL I kind of like the notion of "forced import infection" though...
>
> What do you mean by that ? Being able to force feed an import in a template instantiation ? That'd be great, because of UFCS.

I'm unsure ^^

you brought it up: "We should be able to inject import into templates."

Did you have anything specific in mind?
August 27, 2013
On Tuesday, 27 August 2013 at 16:59:14 UTC, monarch_dodra wrote:
> On Tuesday, 27 August 2013 at 15:10:45 UTC, deadalnix wrote:
>> On Tuesday, 27 August 2013 at 13:51:51 UTC, monarch_dodra wrote:
>>> D has a way of doing things that C++ can, but usually, with a twist that makes it safer and/or more powerful, or with some very well thought mechanics.
>>>
>>> In this case, it really feels as if the whole a host of functionality is just both supported, *and* with no workarounds :/
>>>
>>> If we don't have ADL I kind of like the notion of "forced import infection" though...
>>
>> What do you mean by that ? Being able to force feed an import in a template instantiation ? That'd be great, because of UFCS.
>
> I'm unsure ^^
>
> you brought it up: "We should be able to inject import into templates."
>
> Did you have anything specific in mind?

We can already do this (sortof) by passing some imports in a string/mixin template to the template. Obviously you have to write the template with this in mind though, which isn't ideal. Also you'd have to check for duplicate imports.
August 27, 2013
On 8/27/2013 6:35 AM, Dmitry Olshansky wrote:
> 27-Aug-2013 17:33, Dmitry Olshansky пишет:
>> ADL has a "bug of surprise" written all over it.
>
> *Bag.. though hardly a typo )

I think you've coined a new term!

1 2
Next ›   Last »