next version of DWT?

Frank Benoit keinfarbton at
Sun Apr 29 01:38:39 PDT 2007

> Isn't it possible to make it in oposite way, so that original methods will
> be prefixed and D Api will be clean?

hm, good point.

> and provide overloaded D methods:
> void setText( char[] str );
> void setText( wchar[] str );
> void setText( dchar[] str );
> void setText( String str ); //I mean here string from Tango. Maybe it usable
> in this context?

* in this case setText( "hello" ) will generate a conflict and you need
to write setText( "hello"c ). This is also ugly.
* What to do, if it is the return value? I cannot provide several
methods with only the return value changed.
* What to do, if there are more arguments. Shall i generate every
variation? I think there should be only one D-friendly argument replacement.

Actually I think about this:
change the Java char in D from wchar to jchar as a new type:

typedef wchar jchar;

void setValue( String str );
void setValue( jchar[] val );
void setValue( char[] str ); //Now, its not a conflict

But, what to do with return values?
String getValue();
char[] getValue(); // conflict

More information about the Digitalmars-d-dwt mailing list