On Sat, Apr 25, 2009 at 13:46, Julien Danjou <jul...@danjou.info> wrote:
> At 1240658186 time_t, koniu wrote:
>> I see. Could you explain the rationale? If we where to use this, we
>> could as well limit it to this:
>>  function getdata()
>>    return data
>>  end
>
> Yes, that's another possibility.
> There's no rationale, I just think your filter is too limited and
> narrow-minded.

Haha, thanks :P. I do believe that you must still be talking about the
first version of it because the 2nd one allows just as much as
getdata() except it internalizes some, I believe, typical stuff for
ease of use.

> I'd prefer my solution or getdata() in a first time. Then, if many
> people want to filter on string matching we could add a funtion filter
> based on string matching.

> So, I'd probably stick with getdata() before we dig too much in a
> unrelated direction. ;-)

Agreed, as discussed, a squashed version without filtering and with
getdata is here
http://git.mercenariesguild.net/?p=awesome.git;a=shortlog;h=refs/heads/awful-doc
along with awful.key patch. Should I prepare awful.button same way?

> But then, you'll ask why we don't have a filter function everywhere,
> like for getting visible clients from awful.client.visible().
>
> So we will start writing awful.filter that takes a table of data as
> first arguement and a filter function as a second arg, so we can filter
> any type of data from documentation table to client table, etc.

Haha, über-modular huh, starts feeling a bit like splitting a hair
into four but that's fine by me, the more sensibly reusable code the
better. Newcomers will have a lot of fun figuring out what's what in
awful tho ;].

Yey,
koniu

--
To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.

Reply via email to