From: george.priv@gmail.com
Subject: Re: How to return an empty aggregate
Date: Mon, 7 Apr 2008 13:23:35 -0700 (PDT)
Date: 2008-04-07T13:23:35-07:00 [thread overview]
Message-ID: <43907652-a6ce-4b51-8907-ce0a65277f15@c65g2000hsa.googlegroups.com> (raw)
In-Reply-To: 4683ef29-28aa-47a1-9603-114666c15eab@m71g2000hse.googlegroups.com
On Apr 6, 4:04 pm, Maciej Sobczak <see.my.homep...@gmail.com> wrote:
> On 6 Kwi, 09:00, george.p...@gmail.com wrote:
>
> > You receive the events for logging but you don't want
> > 5,000,000 records of the same to go in when some device malfunctions.
> > You rather want first 10, and something stating that this is serious
> > condition, etc. Is there a way to use stateless adapter or you have to
> > have a context?
>
> There is a way to have a filter Log that feeds its selected output
> into another Log'Class - and that second Log object can be whatever,
> including empty null log.
>
> Hint: essentially you want some Ada equivalent of the following pipe
> construct:
>
> $ someprogram | head > somefile.log
>
> which in some particular case might become just:
>
> $ someprogram | head > /dev/null
>
> as opposed to direct:
>
> $ someprogram > somefile.log
>
> or:
>
> $ someprogram > /dev/null
>
> The presence of "head" filter changes nothing in the applicability of /
> dev/null - that's why, in Ada terms, it can always have the same
> implementation:
>
> type Null_Log is new Log with null record.
>
> --
> Maciej Sobczak *www.msobczak.com*www.inspirel.com
I think you misunderstand. I am not questioning value of the concept
of adapter in general. My point was that value of adapter (strategy
if you wish) with no context is approaching 0 and my example was to
demonstrate precisely that point.
G.
prev parent reply other threads:[~2008-04-07 20:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-01 11:58 How to return an empty aggregate Maciej Sobczak
2008-04-01 12:54 ` Anh Vo
2008-04-01 17:18 ` Adam Beneschan
2008-04-02 7:16 ` Maciej Sobczak
2008-04-01 13:34 ` Dmitry A. Kazakov
2008-04-01 15:00 ` Robert A Duff
2008-04-02 7:19 ` Maciej Sobczak
2008-04-03 5:02 ` george.priv
2008-04-03 9:09 ` Maciej Sobczak
2008-04-04 15:38 ` george.priv
2008-04-04 20:35 ` Maciej Sobczak
2008-04-04 23:58 ` george.priv
2008-04-05 13:48 ` Maciej Sobczak
2008-04-05 16:04 ` george.priv
2008-04-05 21:14 ` Maciej Sobczak
2008-04-05 22:36 ` george.priv
2008-04-06 19:53 ` Maciej Sobczak
2008-04-06 7:00 ` george.priv
2008-04-06 20:04 ` Maciej Sobczak
2008-04-07 20:23 ` george.priv [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox