Closed wenkokke closed 2 years ago
Hm, normally I just set them to 0
or 1
in the .talon files then they seem to work fine. Since those are the only two possible values, is there an advantage of changing it to int
?
Honesty, I guess? Using 0
and 1
works because of implicit conversion to booleans, but at the point where you have a setting of type bool, and it’s actually storing 1
, that’s technically a type error?
I'm not sure I'm in love with either solution. Saying it is an int
discards the semantics that we're after with the setting. Although it is technically more "honest", it sacrifices precision
I actually believe that passing zero or one into a Talon action with an argument of type boolean will pass the type checking. The same is true with settings. Passing any other number will probably be an error, but zero and one is how you do booleans in Talonscript as far as I know. I would keep using booleans when possible.
Various settings use type
bool
, but .talon files cannot contain booleans.These should switch over to type
int
.