Re: [PATCH 02/20] Rename struct attribute accessors

Simon Marchi
2020-03-30T14:45:14Z

On 2020-03-28 3:21 p.m., Tom Tromey wrote:
> This removes the "value_as_" prefix from the struct value accessors.
> This seemed unnecessarily wordy to me.

I would perhaps use "as_string" and "as_address" rather than just
"string" and "address". At least for "address", it could be
interpreted by some as returning the address (pointer) of the
attribute object. The "as_" prefix makes me naturally read it as
"interpret this attribute as a string", "interpret this attribute as
an address".

Not a big deal though, I'm also fine with the patch as-is.

Simon