New operators opStaticIndex and friends
Q. Schroll
qs.il.paperinik at gmail.com
Wed May 15 02:07:46 UTC 2019
On Wednesday, 15 May 2019 at 01:42:57 UTC, Exil wrote:
> On Wednesday, 15 May 2019 at 01:07:10 UTC, Q. Schroll wrote:
>> On Tuesday, 14 May 2019 at 16:15:20 UTC, H. S. Teoh wrote:
>>> On Tue, May 14, 2019 at 03:49:51PM +0000, Q. Schroll via
>>> Digitalmars-d wrote:
>>>> [...]
>>>
>>> +1. I'd love to have this feature too.
>>>
>>>
>>> T
>>
>> I've made it into a DIP: https://github.com/dlang/DIPs/pull/155
>
> Does it need to be called opStaticIndex? Could it just be
> called opIndex and require the specific template arguments. If
> you define opIndex(int)() now, it will never be called right
> (unless you specifically invoke it)?
I don't have thought about names much. It is not completely
obvious to me that reusing existing names works *in any
circumstance*.
More information about the Digitalmars-d
mailing list