2533: Generic functions that take integral arguments should work the same way as their prelude counterparts

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Wed Aug 27 19:47:31 EDT 2008


On 2008 Aug 27, at 11:58, Jonathan Cast wrote:
> On Wed, 2008-08-27 at 09:19 +0200, Henning Thielemann wrote:
>> On Tue, 26 Aug 2008, John Meacham wrote:
>>> But is also makes the functions less useful and another source of
>>> non-completeness. I certainly always considered accepting negative
>>> numbers a feature of those functions and not an infelicity.   
>>> Sometimes
>>> you want 'drop 1 xs' and other times you want 'tail xs' (or  
>>> equivalent).
>>
>> It's very confusing for readers of your programs, if you use 'drop 1'
>> instead of 'tail'. The names 'drop' and 'tail' don't give the  
>> reader a
>> hint, that 'drop' works for empty lists and 'tail' doesn't.
>
> I doubt very much that the name `drop' means anything until you learn
> it.  In particular, it's meaningless for native speakers of Chinese  
> who
> haven't learned English, as well.  And it's only slightly less
> meaningless (when you consider what it does) for native speakers of
> English.


And for that matter, even to me (an experienced programmer) my first  
(admittedly not entirely off base, just mostly) thought is the Forth/ 
PostScript "drop".

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH




More information about the Libraries mailing list