[plt-scheme] changing the name of a struct field accessor

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Sat Nov 28 12:51:19 EST 2009

Is there a way to change the name of a struct field accessor produced by 
"make-struct-field-accessor"?

The name that "make-struct-field-accessor" generates seems somewhat 
specific to its use by "define-struct".

 From a quick look at the 4.2.2 C code, it appears that this name cannot 
be changed, but perhaps I'm missing something.

As a workaround, I could wrap the struct field accessor procedure in a 
procedure that has the desired inferred name.  But then I'd have to take 
a small performance hit, or hope the compiler optimized without losing 
my inferred name.

-- 
http://www.neilvandyke.org/



Posted on the users mailing list.