April 09, 2002 Re: drop ASCII characters from D? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | But then aren't we full-circle back to void foo(char[]); void foo(wchar[]); ... foo("hello"); being ambiguous? Although it sounds like you can (almost?) support both Unicode and ASCII transparently, I'd still like to see Unicode implicitly given more emphasis; for example, the above code snipet would be void foo(achar[]); // ASCII void foo(char[]); // Unicode ... foo("hello"); // Unicode string - calls foo(char[]) foo(A"hello"); // ASCII string - calls foo(achar[]) As far as Win32 platforms go, I guess it depends on what one means by "supporting Unicode." Only a small handful of Win32 APIs are Unicode on Win9x (although the recently released MSLU expands that list considerably). Dell has a complete 1.8Ghz system with 256MB of RAM for $999; given numbers like that, I'm not overly concerned with either processing power or memory. Dan "Walter" <walter@digitalmars.com> wrote in message news:a8t2j5$1mc$1@digitaldaemon.com... > > "J. Daniel Smith" <j_daniel_smith@HoTMaiL.com> wrote in message news:a8s2ng$1jg0$1@digitaldaemon.com... > > So what about my suggestion of making ASCII a bit more difficult to use - > > that is, Unicode is the prefered/default character type in D. 'char' is a > > Unicode character and "abc" is a Unicode string. > > There is no default char type in D. char is ascii, wchar is unicode. The type of "abc" depends on context. The source text can be ascii or unicode (try it!). > > > With the release of Windows XP, it's not going to be very long (months, > not > > years) before a Unicode-enabled platform is the norm for most people. > > All win32 platforms support unicode already. > > > And I'm not sure I buy the "memory" argument - my PocketPC which is easily > > more memory constrainted than any desktop PC only supports Unicode. > > You can shrink down the memory for unicode quite a bit by using UTF8, at the > expense of slowing things down. > > > |
April 09, 2002 Re: drop ASCII characters from D? | ||||
---|---|---|---|---|
| ||||
Posted in reply to J. Daniel Smith | "J. Daniel Smith" <j_daniel_smith@HoTMaiL.com> wrote in message news:a8und0$3e7$1@digitaldaemon.com... > But then aren't we full-circle back to > void foo(char[]); > void foo(wchar[]); > ... > foo("hello"); > being ambiguous? Yes, but that doesn't in any way impede a programmer who wants to write a full unicode app. |
Copyright © 1999-2021 by the D Language Foundation