On 8/21/2019 1:13 PM, Gustavo Massaccesi wrote:
The expander in racket adds something equivalent to
[else (void)]
if there is no else clause. (Try an example with the Macro Stepper.)
So an explicit else clause would not change the speed of the programs.
In some cases the compiler can prove that the else part is not
necessary and drop it, Also, I think that the compiler in RacketCS can
notice that it has no side effects and also drop it if the result is
ignored (but I'm not 100% sure).
Yes. But in most cases, it is impossible to prove that the 'else' is
unnecessary. And as I mentioned in my reply to Hendrick, 'cond' is
pretty simple, but an 'else' - implicit or explicit - can screw up
optimizing tests in a 'case'.
George
--
You received this message because you are subscribed to the Google Groups "Racket
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/racket-users/931ae453-8d87-5ee1-f8e1-ab23466a3647%40comcast.net.