Strings in DWT

Bjoern nanali at nospam-wanadoo.fr
Wed Feb 20 13:31:36 PST 2008


Bill Baxter schrieb:
> Frank Benoit wrote:
>>
>> Strings in Java and D are different.
>> - null vs zero length is in Java completely different
>> - Java works in utf16, char[] is utf8
>>
>> In Phobos there is an alias char[] to "string". Would that make sense 
>> to be used in DWT?
>>
>> With the helper functions in dwt.dwthelper.utils, the char[] can be 
>> used like the Java String in many cases. An alias to String would 
>> remove many replacements. And this would make merging/diffing easier.
>>
>> 1.) "char[]"
>> 2.) alias char[] string;
>> 3.) alias char[] String;
>>
>> What do you think? What should be used in DWT?
> 
> Better wait to see what Tango does first.  Some folks like myself 
> believe that the alias should be added in Tango itself to facilitate 
> compatibility with Phobos:
> http://www.dsource.org/projects/tango/ticket/548
> 
> --bb
And a horse is horse is a horse of course. ++Bill . DWT is depending on 
Tango ergo : No need to be in a hurry

from a Java to Dx view  : wchar[] is looking good, in fact it is not, 
Given D2 Strings, which means Tango for D2, #3 is most probabely a good 
candidate.
  my cents


More information about the Digitalmars-d-dwt mailing list