Re: Ruby's symbols
| From: | Crocodile | Date: | Sat, 05 Jan 2013 10:27:01 +0000 |
| Subject: | Re: Ruby's symbols | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-64542@lists.php.net to get a copy of this message | ||
Sounds like it could make some sense. However, I've got a question..
array(
'label' => 'Comment',
'required' => false,
'property_path' => 'properties.comment'
)
is actually equivalent to
array(
'label' => 'Comment',
'property_path' => 'properties.comment',
'required' => false,
)
(Notice the change in keys order. As long as we just use those arrays as
hash maps, we notice no differences).
With symbols, which act as aliases for integer array keys, the situation
could be different, right? Or excuse me if I don't get what symbols are (I
don't know much about Ruby)
Cheers,
Victor
2013/1/5 Nikita Nefedov <inefedor@gmail.com>
> array(
> 'label' => 'Comment',
> 'required' => false,
> 'property_path' => 'properties.comment'
> )
>