libera/#lisp - IRC Chatlog
Search
20:35:11
jcowan
The trouble with using the result of when/unless in R6RS Scheme is that if the test is satisfied/unsatisfied, you get the value of the last expression, but if the test is unsatisfied/satisfied, you get an arbitrary value -- which might happen to be the same as the value of the last expression. So in R7RS we switched to saying that the value is always arbitrary.
20:39:21
jcowan
The same argument applies for a single-branched `if`: if the first argument is true, you get the second argument, otherwise you get an arbitrary value -- which might happen to be the same as the second argument. And if you want more than one side-effecting expression, you would have to wrap them in progn/begin if you use single-branched if, whereas when/unless allows it directly.
20:58:20
jcowan
A line from the Spice Lisp manual: Since most-positive-fixnum is more than 100 million, you shouldn't need to use bignums unless you are counting the reasons to use Lisp instead of Pascal.
22:57:37
tfeb
jcowan: FWIW when and unless were in lisp machine lisp by 1983, see http://www.bitsavers.org/pdf/mit/cadr/chinual_5thEd_Jan83/chinualJan83_04_FlowOfCtl.pdf
2:07:16
White_Flame
instead of (when (foo) (bar)), you should use (and (foo) (bar)), because it's one character shorter