jsk-ros-pkg / geneus

3 stars 16 forks source link

[generate.py] add feature to write const to string #13

Closed k-okada closed 4 years ago

k-okada commented 9 years ago

see https://github.com/start-jsk/rtmros_common/pull/687 for discussion, -to-symbol ? -to-string ?

snozawa commented 9 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.

k-okada commented 9 years ago

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.

snozawa commented 9 years ago

I meant we should return "string".

k-okada commented 9 years ago

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.