Who here actually uses D?
Robert Clipsham
robert at octarineparrot.com
Sat Jan 1 16:29:13 PST 2011
On 01/01/11 23:51, Adam D. Ruppe wrote:
> Jonathan M Davis wrote:
>> As was discussed in another thread, you're fairly
>> conservative in the D2-specific stuff that you use.
>
> Indeed. Though I've gone into the fancy stuff, I don't go
> wild with it, which probably helps too. It seems the worst
> bugs come from combinations of new-to-D2 features more than
> any one individually.
Maybe this is where I'm going wrong - if a feature's there, I feel I
have to use it! It's like being confronted with a buffet, I can't stop
eating! Even with D1 I find myself biting off more than I can chew so to
speak.
> That didn't work, the property opDispatch and call opDispatch
> screwed each other over. And the property opDispatch could take
> a string, but not a templated argument, making it less than
> ideal. It wouldn't overload opDispatch()(string) with ()(int) either. Bah. I'm
> pretty sure all of that is supposed to work;
> each piece does work, if I take the others out of the class.
I hit the exact same issue recently but in D1 - seems templated methods
don't like being overloaded. In this situation couldn't you use
opDispatch(T:string)(T) and opDispatch(T:int)(T)? I'd guess not, but I
don't know how opDispatch works, or what your code looks like!
--
Robert
http://octarineparrot.com/
More information about the Digitalmars-d
mailing list