Proposal for std.path replacement

Bekenn leaveme at alone.com
Mon Mar 7 19:39:21 PST 2011


On 3/7/2011 2:30 PM, Nick Sabalausky wrote:
>
> --------------------------------------------------
> {almost everything else}
> --------------------------------------------------
>
> Implies:
>
> 1. The ANSI/ASCII APIs should just simply *never* be used.
>

This right here is something that I think needs to be drilled into every 
potential Windows programmer out there.  The underlying file system 
usually encodes file names in Unicode, which provides great flexibility. 
  The ANSI versions of Windows API functions *cannot* handle that.  It 
is therefore impossible to guarantee that you can handle a valid Windows 
file path using the ANSI version of a function.

ANSI versions exist /for backwards compatibility only/.  New 
functionality is often introduced without even providing an ANSI version 
of the function.  Just simply do not use ANSI functions.


More information about the Digitalmars-d mailing list