3 ms·
While the '!' addition to methods is an useful convention, having both collect, and collect! methods, and for example only a delete method for arrays (which doe
by wybo 15y ago
While the '!' addition to methods is an useful convention, having both collect, and collect! methods, and for example only a delete method for arrays (which does change the array it is called on), and similar inconsistencies in libraries, can occasionally lead to unnecessary API-lookups/bugs.
(I have been using Ruby (in a FOSS/academic setting) for a couple of years now (and I know Python too, though still prefer Ruby over it))
- xiaoma 15y agoI never even really questioned the delete method. By its very name it was clear to me that "delete" would be destructive.