3 ms·
There is no "any" type since ThinScript is an ahead-of-time compiled language and emulating dynamic types is a non-goal. Types are required and omitting them is
by constexpr 11y ago
There is no "any" type since ThinScript is an ahead-of-time compiled language and emulating dynamic types is a non-goal. Types are required and omitting them is a syntax error. Right now "let" is an alias for "var" and "var" behaves like "let".
- dukoid 11y agoWhat about implicit conversions to boolean? Is "if (1)" legal? Does "==" require equal types (or compatible types) on both sides?
- constexpr 11y agoRight now the only implicit conversions are null to nullable types and smaller integers to larger ones. There is no "===" right now and "==" requires equal types. I may consider aligning this more with JavaScript in the future. There's a live compiler demo at http://evanw.github.io/thinscript/ http://evanw.github.io/thinscript/ where you can try out all of this yourself :)