DynamoDS / DesignScript

About the DesignScript language
Apache License 2.0
11 stars 10 forks source link

language spec indicates numbers can NOT be converted to bools #38

Open mjkkirschner opened 4 years ago

mjkkirschner commented 4 years ago
From To var number bool string FFI type
var yes no no no no
number yes yes no no no
bool yes no yes no no
string yes no no yes no
FFI type yes no no no Covariant

but later it says:

Logical operators
&&, ||, !
The operand should be bool type; otherwise type conversion will be incurred.

I am curious if numbers, empty strings, or null should be evaluated as falsey or truthy where bools are expected - ie logical operators, and conditional expressions, or if statements.... @aparajit-pratap you filed a few tasks related to this and I am looking for where this is specified - if it's not specified, let's specify it. @gregmarr @pinzart - what does thunderstorm do?