At 00:08  +0800 2007/04/01, bill lam wrote:
Joey K Tuttle wrote:

Further, your example shows yet another kind of side
effect that seems to me to be very bad practice if not
outright pernicious - my hope is that your example will
persuade jsoftware to reconsider (and change) the local
references of mapped names to be READ-ONLY.

Doesn't map_jmf_ already has an option to set the file readonly?

NB. [type [,trailing_shape]] map name;filename [;sharename;ro]



Indeed (thank goodness) that is true - but it doesn't change
(or even decrease much) the likelyhood of accidental data loss
in those cases were write access to a mapped file is needed.


At 11:13  -0600 2007/03/31, Don Guinn wrote:
I totally agree! I have avoided using mapped files because they violate good
programming practices. One must go to great lengths to avoid the pitfalls of
mapped files when writing a script. Many scripts supplied
by JSoftware and by others modify x and y in explicit definitions. And
assigning y to another name and then modify it is just as bad. Big no-no's
for mapped files.

  .......

If someone wants to modify a file, them only allow doing it by using the
original name used to map the file.


Exactly! Surely that is a minor burden and I think using a (suitably
named) mapped global name to write into a file is much more acceptable
than the current situation.

- joey
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to