> Mark objected to the mutating-option-for-"get" overloading. I've agreed but 
> wanted to go further here: optional trailing boolean parameters are an 
> anti-pattern. I'm leaning toward thinking that all boolean option params are 
> an anti-pattern.

All boolean parameters are anti-patterns? All optional boolean parameters? 
What’s the alternative?

I thought that boolean parameters where OK when they were labeled in some 
manner (e.g. via an object literal). But I always find unlabeled parameters 
problematic (beyond the first one). Some of it can be mitigated by choosing 
good function/method names. Furthermore, trailing callable parameters are often 
self-explanatory.

-- 
Dr. Axel Rauschmayer
[email protected]

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to