"Michel Fortin" <michel.for...@michelf.com> wrote in message 
news:isu5tk$816$1...@digitalmars.com...
>
> I understand it's tiresome to create an enum for every parameter, but 
> asking all users to write Flag!"" everywhere is going to be tiresome 
> everywhere else, which is hardly an improvement.
>

Excellent point.

> I also think you are narrowing the problem a little too much. The problem 
> exists everywhere there is a boolean parameter.

And not just bools, either. Graphics libraries typically have the same 
problem in spades, much more than Phobos. But with numbers, not bools. Even 
a Flag expanded to allow *any* enum is still insufficient for that. It seems 
like your design strategy here is (unintentionally, of course) focusing 
primarily on Phobos's own needs rather than really looking out much beyond 
Phobos.

> This includes phobos, druntime, and potentially any other D library. 
> Should Flag!"" become the recommended way to make boolean parameters in D? 
> And should creating a separate Ddoc version of the function signature 
> become the recommended way to document boolean parameters? If so, I think 
> it'll reflect badly on the language.
>


Reply via email to