W3C home > Mailing lists > Public > public-webcrypto@w3.org > April 2014

[Bug 25388] Boolean arguments

From: <bugzilla@jessica.w3.org>
Date: Tue, 29 Apr 2014 21:06:50 +0000
To: public-webcrypto@w3.org
Message-ID: <bug-25388-7213-9KvBnAUnId@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25388

--- Comment #6 from Domenic Denicola <domenic@domenicdenicola.com> ---
I guess the downside would be that, for objects in the spec with the
`.extractable` property, you then would either:

- Have them return true/false, making them inconsistent with the methods under
question
- Have them return "extractable"/"nonextractable", which seems very error prone
especially since both are truthy (e.g. `if (o.extractable) { ... }` will always
pass).

With this in mind I think the boolean argument, while not very good for
readability, is probably the best option.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Tuesday, 29 April 2014 21:06:57 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:17:22 UTC