Unlike .list~of, .queue~of etc. the collection classes "Set" and "Bag" mandate that at least one argument is given.
I would expect that .set~of and .bag~of are syntactically correct and in the case that now arguments are supplied an empty instance of either class should be returned.
In any case should the behaviour of the class method "of" be the same among all collection classes.
Anonymous
Logged In: YES
user_id=1125291
Originator: NO
I've never particularly liked that of() required an argument where there was a perfectly definable behavior for how it should be have with no arguments. I agree this should be consistent, so I've removed the error check from set and bag.
Committed revision 401.