<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><blockquote type="cite" class=""><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">To me it seems logical that comparing Optional<Int> with Int (or another
Optional<Int>), if it's allowed at all, should return Optional<Bool>. Since
conditional statements only accept Bool, the user is forced to handle the
nil case explicitly.</pre></blockquote><div class="">I disagree that comparing Optional values should have a return value of Optional<Bool>.</div><div class="">If the following were to be true:</div><div class=""><br class=""></div><div class="">.None < .Some(0) == .None</div><div class=""><br class=""></div><div class="">Then logically, this would be too:</div><div class=""><br class=""></div><div class="">[] < [1,2,3] == []</div><div class=""><br class=""></div><div class="">I think most people would agree that the correct result to that comparison should be ‘true’, not [].</div><div class=""><br class=""></div><div class="">When comparing ‘container’ types I think it’s important to have a simple Bool result, otherwise things get very peculiar (conceptually the Optional type is really just a container with a maximum count of 1).</div></body></html>