From h.wickham at gmail.com  Thu Aug 22 23:36:41 2013
From: h.wickham at gmail.com (Hadley Wickham)
Date: Thu, 22 Aug 2013 16:36:41 -0500
Subject: [Rd] legitimate use of :::
In-Reply-To: <CADwqtCNSE=-S9r97WcGL=bKosMnTx6KddPc08Tj_kLNPTN3i+Q@mail.gmail.com>
References: <CANROs4dyoRyjoVHZLs7wDrFrjVX-1zvTTv2i4tBzF3f6Rx-XTA@mail.gmail.com>
	<5215F9BD.5030009@statistik.tu-dortmund.de> <52165F15.1090500@yorku.ca>
	<CABdHhvENvyTD6dPtbQzNaGqgwHNtV86juZh=5F7oBQSPJhO1Rw@mail.gmail.com>
	<CADwqtCNSE=-S9r97WcGL=bKosMnTx6KddPc08Tj_kLNPTN3i+Q@mail.gmail.com>
Message-ID: <CABdHhvHsTCgkOxsXSTMWf2PX6apoXHN4jDoqi6s=S3c9BwcfLg@mail.gmail.com>

>>Wasteful of disk space, but disk space is cheap. It's less wasteful of
>>your time, if the referenced code breaks in an unexpected time.  Your
>>time is much more valuable than disk space.
>
> On the other hand, it's quite dangerous software design. What if the
> original author finds a bug and implements a fix, but you don't hear about
> it?
>
> Furthermore, what happens when I come along and need the same functionality?
> Sure I could make a copy, but maybe I only know about your copy and don't
> know it is a copy of something else, so now we have a copy of a copy, which
> is even more problematic. Using ::: prevents this issue.

There are costs and benefits to both approaches. Copy-and-paste also
minimises external dependencies which can be important in some cases.
I'm not arguing for unmitigated duplication, but there are definitely
good reasons to do it.

I have quite a few v. simple functions that live in multiple packages.
Often I want to keep the dependencies of packages as lightweight as
possible (learning from past experiences) and avoid tightly coupling
packages together.

Hadley

-- 
Chief Scientist, RStudio
http://had.co.nz/



[Rd] legitimate use of :::
Hadley Wickham