I'm back
deadalnix
deadalnix at gmail.com
Tue Nov 13 15:51:45 PST 2012
Le 13/11/2012 20:13, Jonathan M Davis a écrit :
> On Tuesday, November 13, 2012 09:45:17 H. S. Teoh wrote:
>> Unfortunately, using ranges in their most general sense
>> is looking like a pipe dream to me right now, and I'm ready to just move
>> on.
>
> The reality of the matter is that there are limits to any abstraction. In
> order to make it take more use cases and situations into account, it must
> become increasingly complicated, and eventually the abstraction becomes
> complicated enough that it's hard to use for even basic cases.
Let me disagree. As stated before, I never used moveXXX in my code. That
doesn't mean it is useless, but that you can definitively work with an
abstraction without messing around with all possible « extensions ».
I'd argue that this is the key to successful abstraction : a solid core,
a possibility for extension and knowledge of such extension being optional.
> So, trying to
> make an abstraction work for everything comes at a definite cost. Rather, it
> should probably try and strike a good balance. It needs to be powerful enough
> to handle the majority of cases but still be simple enough to use in the
> average case. And ranges currently risk being too complicated to use in the
> average case without screwing them up somehow.
>
More information about the Digitalmars-d
mailing list