Closed k-okada closed 4 years ago
see start-jsk/rtmros_common#687 for discussion, -to-symbol ? -to-string ?
Hmm, it is difficult problem, but currently I'm +1 for -to-string
.
This is because we cannot consider case sensitivity by using symbol, such as Hoge
and hoge
.
When we want to convert non-Euslisp program to Euslisp program, it would be better to use string instead of symbol because non-Euslisp program consider both upper case and down case and we need to keep consistency.
do you mean we should return "string"? or we can return symbol but the function name is -string ?
◉ Kei Okada
On Thu, Mar 19, 2015 at 5:16 PM, Shunichi Nozawa notifications@github.com wrote:
see start-jsk/rtmros_common#687 https://github.com/start-jsk/rtmros_common/pull/687 for discussion, -to-symbol ? -to-string ?
Hmm, it is difficult problem, but currently I'm +1 for -to-string. This is because we cannot consider case sensitivity by using symbol, such as Hoge and hoge.
When we want to convert non-Euslisp program to Euslisp program, it would be better to use string instead of symbol because non-Euslisp program consider both upper case and down case and we need to keep consistency.
— Reply to this email directly or view it on GitHub https://github.com/jsk-ros-pkg/geneus/pull/13#issuecomment-83408334.
I meant we should return "string".
I see, it is true that symbol can not distinguish "Pending" and "PENDING" but also think using string may require more careful about programming and I never see constant using lower letter for constant. If we can assume all constant name is CAPTITAL letter, the problem becams very simple. Asked in https://github.com/ros/genmsg/issues/58
◉ Kei Okada
On Mon, Mar 23, 2015 at 11:13 AM, Shunichi Nozawa notifications@github.com wrote:
I meant we should return "string".
— Reply to this email directly or view it on GitHub https://github.com/jsk-ros-pkg/geneus/pull/13#issuecomment-84753188.
see https://github.com/start-jsk/rtmros_common/pull/687 for discussion, -to-symbol ? -to-string ?