- From: Phil Dibowitz <
>
- To:
- Subject: [chef] Re: Re: Re: Re: Re: FC001, attributes as strings vs symbols
- Date: Wed, 17 Oct 2012 10:50:28 -0700
On Wed, Oct 17, 2012 at 01:01:17PM -0400, Jay Feldblum wrote:
>
Phil,
>
>
That's correct. Under the hood, it's all strings.
>
>
The symbol and method syntaxes are just a small bit of sugar over the
>
underlying string syntax. But all of the node attribute keys are kept as
>
strings internally. And all of the methods that fetch keys or iterate over
>
the elements give the keys as strings, not as symbols (and certainly not as
>
methods).
Right. And I think that's a pretty good reason for the best practice to be
"always use strings unless you have a reason to do otherwise."
--
Phil Dibowitz
Open Source software and tech docs Insanity Palace of Metallica
http://www.phildev.net/ http://www.ipom.com/
"Be who you are and say what you feel, because those who mind don't matter
and those who matter don't mind."
- Dr. Seuss
Attachment:
signature.asc
Description: Digital signature
- [chef] Re: Re: Re: Re: Re: Re: FC001, attributes as strings vs symbols, (continued)
Archive powered by MHonArc 2.6.16.