Re:Red Programming Language
by doublerebel on Wednesday November 19, 2014 @01:49AM
(#8628615)
Just saw this. That is not my SO question -- I'm just a lifetime programmer who has never seen rewriting of operator precedence in the tens of languages I've used.
Does the operator precedence convention of treating addition and multiplication equally apply to all of Red? All of REBOL? Or is it just that program? Thanks.
Both Rebol and Red use that convention. It sounds weird at first look, but proved to be a relief in practice (no need to remember any specific precedence rule). Though, we plan to provide a small math-oriented DSL for writing expressions using standard math conventions. It would look like this:
>> print 1 + 2 * 3
== 9
>> print math [1 + 2 * 3]
== 7
Regards,
Arnold