3 ms·
For anyone curious, the precedence is based on the name of the operator: https://nim-lang.org/docs/manual.html#syntax-precedence https://nim-lang.org/docs/manua
by creata 1y ago
For anyone curious, the precedence is based on the name of the operator: https://nim-lang.org/docs/manual.html#syntax-precedence https://nim-lang.org/docs/manual.html#syntax-precedence
- miguel_martin 1y agoAnd there is support for unicode operators: https://nim-lang.org/docs/manual.html#lexical-analysis-unicode-operators https://nim-lang.org/docs/manual.html#lexical-analysis-unico... :)
- cb321 1y agoAlso, very cool. For example, https://github.com/SciNim/Measuremancer https://github.com/SciNim/Measuremancer has Nim make the utf8 ± character be an operator that constructs an uncertain number with which to do error propagation arithmetic upon. So, you can, e.g. say (50±2)*(25±3) in the code and that will give 1250 ± 158 as an answer and if you use the cligen/strUt.formatUncertain that will even get correctly rounded to 1250 ± 160 (2 digits in the uncertainty place { configurable to 1 or 3 or whatnot or even parens notation like 1.25(16)e3 a la The Particle Data Group notation. }).