Open PixxelSong opened 3 years ago
As you mentioned in #1 , maybe we should use 三七五
and 三二五
instead.
As you mentioned in #1 , maybe we should use
三七五
and三二五
instead.
Nope. We can handle this stuff at run-time instead of compile time, making these numbers equivalent to false and true in bool type. In fact this is what C/C++/JS do, while the only difference is these languages use zero and non-zero values.
It's not strong-typed.
So in this case, we just need to treat 325
as a false value. WDYT?
It's not strong-typed. So in this case, we just need to treat
325
as a false value. WDYT?
No, because there are also 3
and 2.5
;)
🤦
考虑到
325
是一种负面评价,而375
则是正面的,我想我们可以用数值325
来表示布尔值false
,用375
表示true
。Since
325
is considered a negative appraisal, and375
is considered positive, we can use integral number325
to represent booleanfalse
, and375
fortrue
, I think.