> > Still, because I'm writing for people new to Racket, I think it's wiser to > promote a habit of explicitly calling an output function. Why? Because as > you move code around, you may be surprised when something stops printing > (because it's no longer at the top level). For instance, new Racketeers > might be confused as to why the output of this program: > > #lang racket > 1 > (begin > 2 > 3) > (let () > 4 > 5) > > is this (4 is not printed): > > 1 > 2 > 3 > 5 >
This honestly makes me wish that `let` *required* that expressions other than the last one produced `void`. Far too often it's a sign that something's wrong, usually because of misplaced parentheses. If an expression that would normally produce a value is being evaluated only for a side effect I'd rather explicitly call that out by requiring it be wrapped in a `(void _)` call. -- 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. For more options, visit https://groups.google.com/d/optout.