Misnomers in EXECUTION_ENVIRONMENT

7 views
Skip to first unread message

Finnian Reilly

unread,
Jun 28, 2018, 7:26:02 AM6/28/18
to Eiffel Users
It has occurred to me that there are some strange directory name misnomers in EXECUTION_ENVIRONMENT.

home_directory_path
I think it natural to expect home_directory_path to return $HOME on Linux and %HOMEDRIVE%\%HOMEPATH% on Windows. The latter environ names have existed since at least Windows-XP and correspond with the time-honored Linux environ variable. One good workable definition of the home directory that is true cross platform is the parent directory of the users personal documents directory.

So why is it that what is returned on Windows-7 with Estudio 16.05 is %HOMEDRIVE%\%HOMEPATH%\AppData\Local? To my mind it would make far more sense to have assigned this value to a function named `user_local_data'. On Linux this could return $HOME/.local. It seems that Microsoft have taken a queue from Linux in naming their directories that way from Vista onwards.

user_directory_path
On Windows 7 user_directory_path is returning %HOMEDRIVE%\%HOMEPATH%\Documents. It would make far more sense to have named this `user_documents_path'?

Going Forward
For the sake of backwards compatibility I know it would be impractical to change the definitions now but I would suggest introducing a new class DIRECTORY_ENVIRONMENT with more intuitively named directories and encourage people to use that going forward.



Reply all
Reply to author
Forward
0 new messages