Skip to content

Should console.debug() be deprecated? #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
BurtHarris opened this issue Oct 20, 2016 · 6 comments
Closed

Should console.debug() be deprecated? #67

BurtHarris opened this issue Oct 20, 2016 · 6 comments

Comments

@BurtHarris
Copy link

BurtHarris commented Oct 20, 2016

The function console.debug() is not present in some environments, e.g. Node.js, and according to whatwg, MSDN and Chrome documentation, it duplicates the functionality of console.log(). Compare with the Node console documentation which makes no mention of debug().

Thus console.debug() seems to serve no useful function. See also microsoft/TypeScript#11751.

@BurtHarris
Copy link
Author

See also http://caniuse.com/#search=console

@domenic
Copy link
Member

domenic commented Oct 20, 2016

It seems more useful to ensure all environments follow the standard and include it, than risk breaking pages by removing it.

@BurtHarris
Copy link
Author

To be clear, I didn't say it should be removed from any browser. I'm suggesting it be deprecated in documentation.

@domenic
Copy link
Member

domenic commented Oct 20, 2016

Deprecation for web features isn't really an interesting concept. Sometimes we deprecate features that are hamful to the platform, such as appcache or showModalDialog, as a prelude to removing them a few years down the line. But we don't deprecate things just because they're redundant; if we did that half of all web APIs would be deprecated. Instead we codify them into the standard to make it clear what is usable by developers and should be implemented by browsers.

@BurtHarris
Copy link
Author

BurtHarris commented Oct 20, 2016

Per the whatwg FAQ, "Removing features is a critical part of spec development". Over time, we've deprecated lots of web features, e.g. tags like <blink> and <keygen>. Furthermore, the console interface's implementation goes far beyond just browsers, to environments where such duplication makes little sense.

@domenic
Copy link
Member

domenic commented Oct 20, 2016

Yep. And we do that for good reason, e.g. blink being harmful to user experience and keygen being harmful to security. In each case it was a multi-year process where we had to get all implementers on board. What is the argument against console.debug that makes it similarly harmful?

@domenic domenic closed this as completed Nov 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants