Re: How to return an empty aggregate



On Apr 6, 4:04 pm, Maciej Sobczak <see.my.homep...@xxxxxxxxx> wrote:
On 6 Kwi, 09:00, george.p...@xxxxxxxxx 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.
.



Relevant Pages

  • Re: How to return an empty aggregate
    ... There is a way to have a filter Log that feeds its selected output ... essentially you want some Ada equivalent of the following pipe ... $ someprogram> somefile.log ... The presence of "head" filter changes nothing in the applicability of / ...
    (comp.lang.ada)
  • Re: Mounting a Dichro DG head to a Beseler CB-7?
    ... > adapter to mount the head to the CB-7. ... From just resting the head on the enlarger it seems ... If it had a longer cord I could just leave it next to the enlarger ... > but it's short enough that it looks like I'll need to mount it to the head. ...
    (rec.photo.darkroom)
  • Re: OT - what do you use to carry your Digital SLR while cycling ?
    ... appropriate adapter to take a suitable head. ... That doesn't sound too bad - getting on for 6kg with a head, ... Carbon taps are about 2 quid a pop, ... If the change of stud size is from big to small, ...
    (uk.rec.cycling)
  • Mounting a Dichro DG head to a Beseler CB-7?
    ... adapter to mount the head to the CB-7. ... From just resting the head on the enlarger it seems ... If it had a longer cord I could just leave it next to the enlarger ... but it's short enough that it looks like I'll need to mount it to the head. ...
    (rec.photo.darkroom)
  • Re: STB Dual Ergo/MC
    ... > Texas Bill, are you sure that each head has 2MB? ... I have yet to power up the adapter. ...
    (comp.sys.ibm.ps2.hardware)