dynamic classes and duck typing
Walter Bright
newshound1 at digitalmars.com
Tue Dec 1 19:13:34 PST 2009
Leandro Lucarella wrote:
> I think code translation from other languages is not a good reason for
> adding complexity...
I think it is. We wouldn't have DWT otherwise, for example. Inner
classes were added specifically in order to speed up the translation
process.
>> The code complexity is suppose I create a mutex object. Every time I
>> get the mutex, I want the mutex to be released on all paths. With
>> RAII, I build this into the mutex object itself.
>
> But you can do that with the 'with' statement!
The with goes at the use end, not the object declaration end. Or I read
the spec wrong.
More information about the Digitalmars-d
mailing list