Funny, I'd go the other way. We have `parseInt` in part because we also have `parseFloat`. `Date` has `parse` (but it doesn't return a `Date`, sigh). `JSON` has `parse`.
For me, consistency with Java isn't important for this. My $0.02 for what it's worth... -- T.J. Crowder On Mon, Mar 20, 2017 at 7:07 PM, James Treworgy <[email protected]> wrote: > I'd say there's no clear model for consistenty, e.g. JSON.parse. One could > argue that the template is that anything which has only one way to parse is > to use `parse`. Numbers have more than one way (`parseInt`, `parseFloat`) > > > On Mon, Mar 20, 2017 at 3:04 PM, Dmitry Soshnikov < > [email protected]> wrote: > >> On Mon, Mar 20, 2017 at 11:57 AM, T.J. Crowder < >> [email protected]> wrote: >> >>> Any reason for not just using `Boolean.parse`? (Rather than repeating >>> `Boolean` in the function name?) >>> >>>> >>>> >> Just a copy-paste from Java, similarly was done with `parseInt` taken >> from Java. But just `parse` probably would work too. For consistency and >> predictability `parseBoolean` is probably better now. >> >> Dmitry >> >> _______________________________________________ >> es-discuss mailing list >> [email protected] >> https://mail.mozilla.org/listinfo/es-discuss >> >> >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

