Marco Leise <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #4 from Marco Leise <> 2012-08-15 06:22:24 PDT ---
I think Delphi has the most convenient implementation of sets.

     TWorkDay = (Monday, Tuesday, Wednesday, Thursday, Friday) ;
     TDaySet = set of TWorkDay;
     days : TDaySet;
     days := [Monday, Friday];

     days := days + [Tuesday, Thursday] - [Friday];

     if Wednesday IN days then ShowMessage('I love Wednesday!') ;

It also uses the 2^n binary notation internally. Any proposed solution should
add safety as well as the basic set operators. As long as it is still easier to
write "set &= ~flag" to remove a flag from a set, it failed its mission.
It would be even better if a set type would be allowed in bindings to C code or
painlessly converted to it's integer representation with "set.val" or similar.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to