[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Long-name/short-name complexity
From: |
John Darrington |
Subject: |
Re: Long-name/short-name complexity |
Date: |
Tue, 26 Apr 2005 11:21:23 +0800 |
User-agent: |
Mutt/1.3.28i |
On Mon, Apr 25, 2005 at 07:48:23PM -0700, Ben Pfaff wrote:
[snip]
I think that adopting the model I describe above makes sense. I
don't think there's any need to maintain any map, because we can
resolve any conflicts at SAVE (EXPORT, etc.) time. When we
create a new variable without reference to a system file, we
don't have to assign it a short name at all; again, that can be
delayed until SAVE.
Renaming is easy with this model. If we want SPSS-compatible
behavior for renames, renaming variables doesn't change the short
name. If we want "enhanced" behavior, renaming variables deletes
the short name, because that will cause those variables to
receive new and appropriate short names at SAVE time. It'll be
easy to support either behavior with our usual command-line
switch.
I agree with your comments and your conclusion.
I suppose I was hoping to do away with one of the names in
struct variable, because it would make for better encapsulation. But
if we leave it there, it's certainly simpler and more efficient than
using a map. (If only we were using C++, then the short name could be
a private member variable .... )
The fact that SPSS v12 (unlike PSPP 0.3.2) seems to always write its
system files with the order of its variables consistent with that of
its name table, suggests that SPSS uses the implementation you've
described.
J'
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.
pgpzQcqi_lFXe.pgp
Description: PGP signature