From: Dennis Newbold Date: 2002-05-31T02:36:24+09:00 Subject: Re: OS independent scripts, system calls on Windows and Linux On Wed, 29 May 2002, Tobias Reif wrote: > > Dossy wrote: > >> Unlike Unix, where "date" is a real command that can be executed > >> by another program, in DOS the "date" command is a shell builtin, > >> part of COMMAND.COM (or CMD.EXE, or whatever DOS shell you're > >> running). So, this isn't a bug in Ruby at all, it's a misunderstanding > >> of yours how things are supposed to work. > > > It's not a bug, it's a potential RCR for a probably useful and feasible > improvement. I do not want to need to know "how things work" regarding > CMD.EXE etc.; I want Ruby to handle that for me, if possible. > What you are asking is probably possible. However, it creates kind of a slippery slope effect. For example, suppose your script wanted to issue a Linux command for which there was no Windows equivalent, neither as an external command, nor as one built in to cmd.exe (and there are a LOT of commands which match that description). Do you want Ruby to "hide" those differences from you as well? This would require Ruby to be a language and a platform emulation layer (like cygwin) as well. I'm not sure exactly where to draw the line, but at some point, the programmer has to shoulder the responsbility for understanding platform differences himself. Dennis