Strings in DWT

Bill Baxter dnewsgroup at billbaxter.com
Wed Feb 20 11:20:45 PST 2008


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


More information about the Digitalmars-d-dwt mailing list