It seems that on Unix, that value of
tcl_platform(user) is simply copied over
from env(USER) or env(LOGNAME).
There doesn't seem to be any attempt
to discover and report the actual
uid under which the process is running.
On Windows, the value is taken first
from env(USERNAME), and a call
to GetUserName() takes place only
if env(USERNAME) is not set.
This is a bit troubling. Tcl already provides
access to the environment variables
via the env array, so there's really
nothing new provided. However, because
the value is placed in tcl_platform(user)
it gains the color of authority as a value
provded by Tcl iteself, distinguished
from the env variable values, which any
programmer knows can be set by the
Anyone programmer trusting tcl_platform(user)
to be truthful is acting on misplaced faith.
The existence of tcl_platform(user) encourages
such inappropriate trust.