> I can understand your interpretation. But as you can see from Dave's
> question, there are other possible and equally valid interpretations of
> the semantics of empty lists.
>
I do not see the semantics of any alternate logic. I already explained
how an AND list is GATING and an OR list is ENABLING.
When I learnt Haskell programming (well a little bit of that :-), I learnt that:
-- OR of an empty list is False
or[] = False;
-- also
-- AND of an empty list is True
and[] = True;
It is like when you define an operation on a list, you start with a
seed. And I am sure template meta-programming in C++ has similar
semantics.
> The semantics you describe can easily be implemented in user-designed classes.
Very true. But my point is that when we define a functions semantics
(and its corner cases), we should make it semantically correct.
And IMHO....
wait( timeout, empty_list );
should wait for ZERO time in case the empty_list is sc_event_and_list
(because no event GATES the wait here). And it should timeout in case
it is an sc_event_or_list (because no event ENABLES the wait here). If
this is too confusing, I think we should have an exception for wait(
timeout, empty_list) too.
Regards
- Puneet
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Tue Nov 2 04:04:05 2010
This archive was generated by hypermail 2.1.8 : Tue Nov 02 2010 - 04:04:07 PDT