Dear god, an extra line to make it obvious at first glance that it's modified in-place.
While I support reading the docs, and having good docs (which we have), an API that does not require checking the manual for semantics is even better. I like ruby's ? and ! suffixes to denote semantics for example, that's brilliant.
On Tue, Apr 12, 2011 at 11:25 AM, Tang Daogang
<daogangtang@gmail.com> wrote:
On Mon, Apr 11, 2011 at 9:25 PM, Tony Finch
<dot@dotat.at> wrote:
Henning Diedrich <
hd2010@eonblast.com> wrote:
> I heard in some other quarters it's called schönfinkeln and is all the hype.
Is this using Schönfinkeln to mean something different from Currying?
Method chaining like o:m1():m2() is not related to currying because each
method returns the object so that further actions may be performed on it,
whereas with a curried application f()()() the function returns a
different more specific function.
It is good OO library design for a method that modifies an object in
place to return its self.
Agree!
Tony.
--
f.anthony.n.finch <dot@dotat.at> http://dotat.at/
Viking, North Utsire, South Utsire, Forties, Cromarty, Forth, Tyne, Dogger,
Fisher: Southerly or southwesterly 4 or 5, veering westerly or northwesterly 5
to 7, occasionally gale 8 later in South Utsire and Fisher. Slight or
moderate, occasionally rough in Viking, South Utsire and Fisher. Rain for a
time, then showers. Moderate or good, occasionally poor at first.
--
Nothing is impossible.