.
D 2024-06-20T02:20:36.414
J closedate 2460481.59764368
J closer apnadkarni
J icomment I\sunderstood\sthis\sis\sabout\sscript\slevel,\sbut\sthe\sanalogy\sstill\sholds.\sWhether\sin\sC,\sor\sTcl\sor\sany\sother\slanguage,\sthere\sis\sa\sdistinction\sbetween\sa\s*name*\sand\sthe\s"object"\sthat\sit\sidentifies.\sA\sprocess\s"object"\sis\sidentified\sby\sits\sPID,\sa\sfile\sis\sidentified\sby\sits\sname/path,\sand\sa\sstream\sreturned\sby\sopen\sby\sits\sfile\sdescriptor.\r\n\r\nMy\sview\sis\sthe\ssame\sis\strue\sof\sTcl\schannels.\sThe\schannel\sitself\sis\sa\sprogramming\sconstruct\sfor\sI/O\sbuilt\son\stop\sof\sfiles,\ssockets,\spipes\sor\swhatever.\sWhat\sthe\sopen\sor\ssocket\scommands\sreturn\sis\sa\sreference\sto\sthis\sconstruct\sin\sthe\sform\sof\san\sidentifier\sor\sname.\sIf\swe\swere\sto\shave\sa\s`dup`\scommand,\s(I\sthink\sTclX\smay\seven\shave\sone)\sthat\semulated\sthe\sUnix\sdup,\sit\swould\screate\sa\snew\sreference/name\sand\s*not*\sa\snew\schannel.\sHence\sthe\sdistinction.\r\n\r\nNow\san\sopposite\sview\smight\sbe,\sthat\sthe\sword\s"channel"\sis\sin\sfact\sthe\sreference\sto\sthe\sI/O\sconstruct\sand\snot\sthe\sconstruct\sitself.\sPerhaps\sthat\sis\syour\sposition.\sPlausible\sbut\swould\snot\sreally\sfit\swhen\swe\stalk\sabout\s"pushing\sa\stransform\son\sto\sa\schannel".\r\n\r\nIn\sany\scase,\sas\sI\ssaid\sin\smost\scases\sthe\sdistinction\sis\simmaterial\sas\ssemantics\sare\sclear\sfrom\scontext\sbut\sif\swe\sever\sget\saround\sto\sclearly\sdocumenting\sthe\snouns\sand\sverbs\sas\sDon\ssuggested,\sthat\sdistinction\sshould\sbe\smaintained.
J login apnadkarni
J mimetype text/x-markdown
K 7be97a685975ec271a02518a0d88c6bc121f8df6
U apnadkarni
Z 986cccf7f44bdfda9751310ab2584a6e