Hacker News new | past | comments | ask | show | jobs | submit login

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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: