Re: [whatwg] [Fetch] ambiguity problem?

From: whatwg <whatwg-bounces@lists.whatwg.org> on behalf of Brian Kardell <bkardell@gmail.com>

> console. log(o.responseText);
> console. log(o.responseText);

This is why I've been advocating for asJSON() and friends to be verbs, not nouns, i.e. readAsJSON(). Showing how you take an action makes you think harder about whether the action will be repeatable or not.

(To me, in the context of a stream or a response, "read" is not repeatable. But others have suggested "consume" as a verb that makes this clearer, for people who aren't as steeped in the semantics of those objects.)

Received on Tuesday, 12 August 2014 17:38:37 UTC