From: Zoran V. <zv...@ar...> - 2005-07-03 08:13:14
|
Hi! I'm currently after implemeting the Tcl VFS layer in the code and I stumbled in some dusty code corners... Following commands I never actually used and their functionality is already well-done by the Tcl alone: ns_cp (file copy) ns_mkdir (file mkdir) ns_rmdir (file delete) ns_unlink (file delete) ns_normalizepath (file normalize) ns_link (file link -hard) ns_symlink (file link -symbolic) ns_rename (file rename) I do not know why we would like to maintain those commands when Tcl is already giving us a good and maintained interface to the needed functionalitly? I have some ideas: A. I could just trash those commands (some of you will probably not like it, although this would be the best option). B. I could re-route those calls to their corresponding Tcl commands by a means of a tiny wrapper and emit a warning message in the log file that those commands are deprecated. C. I could leave the internal code as-is and just emit the warning message in the log that those commands are deprecated. D. I could throw error on those commands telling the user to use the Tcl equivalent. E. I could leave them as-is i.e. they will not be VFS savvy. Now, were do you want to go today? Zoran |
From: Stephen D. <sd...@gm...> - 2005-07-03 09:40:24
|
On 7/3/05, Zoran Vasiljevic <zv...@ar...> wrote: > Hi! >=20 > I'm currently after implemeting the Tcl VFS layer > in the code and I stumbled in some dusty code corners... >=20 > Following commands I never actually used and their > functionality is already well-done by the Tcl alone: >=20 > ns_cp (file copy) > ns_mkdir (file mkdir) > ns_rmdir (file delete) > ns_unlink (file delete) > ns_normalizepath (file normalize) > ns_link (file link -hard) > ns_symlink (file link -symbolic) > ns_rename (file rename) >=20 > I do not know why we would like to maintain those > commands when Tcl is already giving us a good and > maintained interface to the needed functionalitly? >=20 > I have some ideas: >=20 > A. > I could just trash those commands (some of you > will probably not like it, although this would be > the best option). >=20 > B. > I could re-route those calls to their corresponding > Tcl commands by a means of a tiny wrapper and emit > a warning message in the log file that those commands > are deprecated. >=20 > C. > I could leave the internal code as-is and just emit > the warning message in the log that those commands > are deprecated. >=20 > D. I could throw error on those commands telling the > user to use the Tcl equivalent. >=20 > E. > I could leave them as-is i.e. they will not be VFS savvy. >=20 > Now, were do you want to go today? > Zoran Remove them and add simple wrappers in tcl/compat.tcl |
From: Bernd E. <b.e...@ki...> - 2005-07-03 12:01:13
|
Hi Zoran, > ns_cp (file copy) > ns_mkdir (file mkdir) > ns_rmdir (file delete) > ns_unlink (file delete) > ns_normalizepath (file normalize) > ns_link (file link -hard) > ns_symlink (file link -symbolic) > ns_rename (file rename) > > I do not know why we would like to maintain those > commands when Tcl is already giving us a good and > maintained interface to the needed functionalitly? What was the reason the commands exist at all? :-) > Now, were do you want to go today? I vote for Stephens tcl/compat.tcl way. A log notice would be nice to track down sideeffects of the change, just in case. |
From: Zoran V. <zv...@ar...> - 2005-07-03 12:13:48
|
Am 03.07.2005 um 14:01 schrieb Bernd Eidenschink: > Hi Zoran, > > >> ns_cp (file copy) >> ns_mkdir (file mkdir) >> ns_rmdir (file delete) >> ns_unlink (file delete) >> ns_normalizepath (file normalize) >> ns_link (file link -hard) >> ns_symlink (file link -symbolic) >> ns_rename (file rename) >> >> I do not know why we would like to maintain those >> commands when Tcl is already giving us a good and >> maintained interface to the needed functionalitly? >> > > What was the reason the commands exist at all? :-) > I think this is left-over from Tcl7.x and AS 2.0 or earlier. > >> Now, were do you want to go today? >> > > I vote for Stephens tcl/compat.tcl way. A log notice would be nice > to track > down sideeffects of the change, just in case. Then be it. I will make compat.tcl wrappers and emit the: ns_log warning "foo call is deprecated: use bar instead" Zoran |