On Wed, 21 Aug 2019 03:48:29 -0700, Sorawee Porncharoenwase
<sorawee.pw...@gmail.com> wrote:

> On Wed, 21 Aug 2019 02:55:46 -0700 (PDT), Chris Stephenson 
> <cjkstephen...@gmail.com> wrote:

>> (b)  Conds allowed without else. Even beginner student allows this. It
>> causes bugs. In htdp/universe you can end up with a void universe or a void
>> somewhere in univers. the error emerges a long distance in space and time
>> from the code that causes it. Make else clauses compulsory.
>>
>
>A lot of people agree with you. Here's a (pre-) RFC on the issue:
>https://github.com/racket/racket2-rfcs/issues/39


I don't like the idea of compulsory 'else' - for 'cond' or 'case' or
'match' or ...

'Else' isn't needed if all input cases are covered, but in almost all
real world uses, the compiler is not able to prove the 'else' is
unneeded so as to prevent emitting code for it.  And depending on how
the compiler structures the tests (cond is simple, case less so),
adding 'else' into the mix may increase execution time as well.


YMMV,
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/esjqledhdohgt3eogv6s9sjvfibml0dgkf%404ax.com.

Reply via email to