Frank Schönheit - Sun Microsystems Germany wrote:
Hi Bjoern,
Why not having:
// set some limited maximum length
SetMaxTextLen( xub_StrLen );
SetUnlimitedMaxTextLen();
bool IsUnlimitedMaxTextLen();
That's the API I would prefer. But seriously, since this would be a
radical change for a rather small benefit, I don't really see a good
reason to embark on this.
You can simplify this further with a sum type like S = unit + xub_StrLen
(where it should be rather obvious, IMO, that the unit branch means "no
limit")
SetMaxTextLen(S);
S GetMaxTextLen();
Sum types can be mimiced in C++, more or less elegantly.
-Stephan
Ciao
Frank
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]