On Tue, Sep 6, 2011 at 10:50 AM, Michal Suchanek <hramrach / centrum.cz> wrote:
> Hello
>
> I would somewhat expect ENV["HOME"] return %ProfileDir% when %HOME% is not set.
>

I'm not inquiring about what value is used, but the behavior of
ENV["HOME"] been added if is absent in the environment.

My question is if this was due memoization optimization or what.

> That allows programs to get a user-writable directory without
> special-casing Windows.
>

Home directory will resolve with the following logic

It will try the following environment variables:

HOME
HOMEDRIVE + HOMEPATH
USERPROFILE
CSIDL_PROFILE
CSIDL_PERSONAL.

There is no ProfileDir environment variable, but I believe the above
listed options cover what you expected it to do.

-- 
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupy