|
From: | Bozhidar Batsov |
Subject: | Re: if-let and when-let: parallel or sequential |
Date: | Mon, 11 Aug 2014 20:49:29 +0300 |
On August 11, 2014 at 17:42:20, Stefan Monnier (address@hidden) wrote:
Practically speaking, the most common case people run into is checking whether a single object is nil and binding it to some local if it’s not. Binding multiple locals in such a form reduces the clarity of the code because the semantics are not that clear anymore - should all the forms produce non-nil or should only the first form produce non-nil? Obviously people can (and should) read the documentation, but I’m a huge believer in intuitive APIs. That said, I’m fine with whatever behavior you decide upon, as I believe those functions are valuable additions regardless. |
[Prev in Thread] | Current Thread | [Next in Thread] |