API Design: Boolean Trap

One of the best articles I read recently!

This make me think that I don't know many important thing about API Design :(

http://ariya.ofilabs.com/2011/08/hall-of-api-shame-boolean-trap.html

Boolean API parameters destroy code readability. After reading it I can agree and I will try avoid it in my code.Fun to read, strongly recommend!

API design principles are from Nokia QT library but as author explains they in the root are language agnostic, at least for similar to C languages.

https://wiki.qt.io/API_Design_Principles



Share on Hacker News
Share on LinkedIn


← Home


Want to learn more?

Sign up to get a digest of my articles and interesting links via email every month.

* indicates required

Please select all the ways you would like to hear from Krzysztof Kula:

You can unsubscribe at any time by clicking the link in the footer of my emails.

I use Mailchimp as a marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.